#17723: primary decomposition: provide a descriptive error message for illegal
algorithm choice
-------------------------+-------------------------------------------------
   Reporter:             |            Owner:
  jakobkroeker           |           Status:  new
       Type:             |        Milestone:  sage-6.5
  enhancement            |         Keywords:  primary decomposition error
   Priority:  trivial    |  message
  Component:             |          Authors:
  commutative algebra    |  Report Upstream:  N/A
  Merged in:             |           Branch:
  Reviewers:             |     Dependencies:
Work issues:             |
     Commit:             |
   Stopgaps:             |
-------------------------+-------------------------------------------------
 {{{
 sage: R.<x,y>=QQ[]
 sage: I = R.ideal(x)
 sage: I.primary_decomposition("elephants")
 ---------------------------------------------------------------------------
 UnboundLocalError                         Traceback (most recent call
 last)
 <ipython-input-3-640b8340fda6> in <module>()
 ----> 1 I.primary_decomposition("elephants")

 /home/kroeker/Projects/sage/local/lib/python2.7/site-
 packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
 __call__(self, *args, **kwds)
     603         if not R.base_ring().is_field():
     604             raise ValueError("Coefficient ring must be a field for
 function '%s'."%(self.f.__name__))
 --> 605         return self.f(self._instance, *args, **kwds)
     606
     607 require_field = RequireField

 /home/kroeker/Projects/sage/local/lib/python2.7/site-
 packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
 primary_decomposition(self, algorithm)
    1159           York 1993.
    1160         """
 -> 1161         return [I for I, _ in
 self.complete_primary_decomposition(algorithm)]
    1162
    1163     @require_field

 /home/kroeker/Projects/sage/local/lib/python2.7/site-
 packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
 __call__(self, *args, **kwds)
     603         if not R.base_ring().is_field():
     604             raise ValueError("Coefficient ring must be a field for
 function '%s'."%(self.f.__name__))
 --> 605         return self.f(self._instance, *args, **kwds)
     606
     607 require_field = RequireField

 /home/kroeker/Projects/sage/local/lib/python2.7/site-
 packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
 wrapper(*args, **kwds)
     503         """
     504         with LibSingularDefaultContext():
 --> 505             return func(*args, **kwds)
     506     return wrapper
     507

 /home/kroeker/Projects/sage/local/lib/python2.7/site-
 packages/sage/rings/polynomial/multi_polynomial_ideal.pyc in
 complete_primary_decomposition(self, algorithm)
    1086
    1087         R = self.ring()
 -> 1088         V = [(R.ideal(X[0]), R.ideal(X[1])) for X in P]
    1089         V = Sequence(V)
    1090         self.__complete_primary_decomposition[algorithm] = V

 UnboundLocalError: local variable 'P' referenced before assignment
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17723>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to