From: Antonio Jimenez Pastor Date: Wed, 10 Jul 2019 08:46:36 +0000 (+0200) Subject: Fixed a couple of errors in ddFunction.py and oreOperator.py due to the X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=7c3148244547be258b6ed54e3344ad49ba4feec4;p=ajpastor%2Fdiff_defined_functions.git Fixed a couple of errors in ddFunction.py and oreOperator.py due to the last merge. Added the .directory file for .gitignore --- diff --git a/.gitignore b/.gitignore index fd20fdd..dfc6795 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ +# Directory files for Dolphin configuration +.directory +# Compiled files *.pyc diff --git a/ajpastor/dd_functions/ddFunction.py b/ajpastor/dd_functions/ddFunction.py index f62c2c0..0b59ad3 100644 --- a/ajpastor/dd_functions/ddFunction.py +++ b/ajpastor/dd_functions/ddFunction.py @@ -412,10 +412,12 @@ class DDRing (Ring_w_Sequence, IntegralDomain): except: pass; if(F is None): - raise TypeError("Incompatible original structures:\n\t- %s\n\t- %s" %(pself, pS)); + return None; + #raise TypeError("Incompatible original structures:\n\t- %s\n\t- %s" %(pself, pS)); if(not F in IntegralDomains()): - raise TypeError("Pushout of the original structures is not an integral domain:\n\t- %s" %F); + return None; + #raise TypeError("Pushout of the original structures is not an integral domain:\n\t- %s" %F); if(not F.is_field()): F = F.fraction_field(); @@ -423,7 +425,8 @@ class DDRing (Ring_w_Sequence, IntegralDomain): polys = {str(el[0 ]):el[1 ] for el in gens_self['algebraic']} for el in gens_S['algebraic']: if(polys.get(str(el[0 ]), el[1 ]) != el[1 ]): - raise TypeError("Incompatible names in algebraic extensions:\n\t- %s\n\t- %s" %(el,(el[0 ],polys[str(el[0 ])]))); + return None; + #raise TypeError("Incompatible names in algebraic extensions:\n\t- %s\n\t- %s" %(el,(el[0 ],polys[str(el[0 ])]))); polys[str(el[0 ])] = el[1 ]; sorted_names = sorted(polys); diff --git a/ajpastor/operator/oreOperator.py b/ajpastor/operator/oreOperator.py index 08b15c2..450228e 100644 --- a/ajpastor/operator/oreOperator.py +++ b/ajpastor/operator/oreOperator.py @@ -179,13 +179,7 @@ class w_OreOperator(Operator): def _compute_derivative_solution(self): d = self.__oa.gen(); - try: - return w_OreOperator(self.base(), self.operator/d); - except ValueError: - c = self.getCoefficient(_sage_const_0 ); - dc = self.derivate()(c); - - return w_OreOperator(self.base(), ((c*d - dc)*self.operator)/d); + return w_OreOperator(self.base(), self.operator.annihilator_of_associate(d)); def _compute_integral_solution(self): return w_OreOperator(self.base(),self.operator.annihilator_of_integral());