Ticket #3963 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

[with patch, positive review] bug in converting Sage's rationals to Sympy rationals

Reported by: mhansen Assigned to: was
Priority: major Milestone: sage-3.1.2
Component: interfaces Keywords:
Cc:

Description

from sympy import Symbol
QQ(1)+Symbol('x')*QQ(2)

produces an error:

TypeError                                 Traceback (most recent call
last)

/Applications/sage/<ipython console> in <module>()

/Applications/sage/element.pyx in
sage.structure.element.ModuleElement.__add__ (sage/structure/element.c:
5606)()

/Applications/sage/coerce.pyx in
sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/
coerce.c:6288)()

TypeError: unsupported operand parent(s) for '+': 'Rational Field' and
'<class 'sympy.core.mul.Mul'>'

Attachments

trac_3963.patch (1.0 kB) - added by mhansen on 08/26/2008 05:53:57 PM.

Change History

08/26/2008 05:53:57 PM changed by mhansen

  • attachment trac_3963.patch added.

08/26/2008 05:54:37 PM changed by mabshoff

  • summary changed from [with patch, needs review] bug in converting Sage's rationals to Sympy rationals to [with patch, positive review] bug in converting Sage's rationals to Sympy rationals.

Positive review.

Cheers,

Michael

08/26/2008 05:57:21 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.

Merged in Sage 3.1.2.alpha1