Looking deeper, I think the problem might be with S.NegativeInfinity._sage_:
In [48]: source((-oo)._sage_)
In file: ./sympy/core/numbers.py
def _sage_(self):
import sage.all as sage
#XXX: fixme, this should work:
#return sage.Integer(self[0])/sage.Integer(self[1])
return sage.Integer(self.p)/sage.Integer(self.q)
But oo._sage_ (assumedly) does the right thing:
In [49]: source(oo._sage_)
In file: ./sympy/core/numbers.py
def _sage_(self):
import sage.all as sage
return sage.oo
I'm not sure why the former does not just return -sage.oo. Anyway, I
bet if you patch the SymPy code to do that, it will work (let us know
if it does, so we can fix it here too).
Aaron Meurer
On Thu, Jun 30, 2011 at 5:30 PM, Francois Bissey
<[email protected]> wrote:
>> By the way, this is because we (finally) changed the default ordering
>> in the printer to lexicographic (no more "backwards" 2 + x).
>>
>> Regarding the test failure, it's a little hard to tell what's going on
>> from the traceback (and with no knowledge of Sage code), but it's
>> perhaps caused by the fact that we implement infinity as Rational(1,
>> 0). See http://code.google.com/p/sympy/issues/detail?id=281.
>>
> That would explain what's going on here. Thank you again for the pointer.
> I think we'll have to work on that sage side.
>
> Francois
>
> This email may be confidential and subject to legal privilege, it may
> not reflect the views of the University of Canterbury, and it is not
> guaranteed to be virus free. If you are not an intended recipient,
> please notify the sender immediately and erase all copies of the message
> and any attachments.
>
> Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more
> information.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.