#20607: bug in LaurentPolynomial.factor
---------------------------------------+----------------------------
Reporter: mmarco | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: commutative algebra | Resolution:
Keywords: laurent polynomials | Merged in:
Authors: Miguel Marco | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------------+----------------------------
Changes (by {'newvalue': u'Miguel Marco', 'oldvalue': ''}):
* status: new => needs_review
* author: => Miguel Marco
* cc: rws, vdelecroix, stumpc5, etn40ff (added)
* component: PLEASE CHANGE => commutative algebra
* keywords: => laurent polynomials
* type: PLEASE CHANGE => defect
Old description:
New description:
Factoring multibvariable laurent polynomials over the integers might fail
as follows:
{{{
sage: L.<x,y> = LaurentPolynomialRing(ZZ)
sage: f = y + x/y
sage: f.factor()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-7-429743410e57> in <module>()
----> 1 f.factor()
/home/mmarco/sage/src/sage/rings/polynomial/laurent_polynomial.pyx in
sage.rings.polynomial.laurent_polynomial.LaurentPolynomial_mpair.factor
(/home/mmarco/sage/src/build/cythonized/sage/rings/polynomial/laurent_polynomial.c:29472)()
2511 """
2512 pf = self._poly.factor()
-> 2513 u = self.parent(pf.unit().dict()) # self.parent won't
currently take polynomials
2514
2515 g = self.parent().gens()
/home/mmarco/sage/src/sage/structure/element.pyx in
sage.structure.element.Element.__getattr__
(/home/mmarco/sage/src/build/cythonized/sage/structure/element.c:4649)()
411 dummy_error_message.name = name
412 raise dummy_attribute_error
--> 413 return getattr_from_other_class(self,
P._abstract_element_class, name)
414
415 def __dir__(self):
/home/mmarco/sage/src/sage/structure/misc.pyx in
sage.structure.misc.getattr_from_other_class
(/home/mmarco/sage/src/build/cythonized/sage/structure/misc.c:1870)()
257 dummy_error_message.cls = type(self)
258 dummy_error_message.name = name
--> 259 raise dummy_attribute_error
260 if isinstance(attribute, methodwrapper):
261 dummy_error_message.cls = type(self)
AttributeError: 'sage.rings.integer.Integer' object has no attribute
'dict'
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/20607#comment:1>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.