#12345 closed defect (fixed)
Sympy minus infinity doesn't convert to Sage
Reported by: | kcrisman | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-5.1 |
Component: | symbolics | Keywords: | sd40.5 |
Cc: | certik, rws | Merged in: | sage-5.1.beta4 |
Authors: | Douglas McNeil | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | u/akhi/sympy_minus_infinity_doesn_t_convert_to_sage (Commits) | Commit: | 52db42b01c1b86c752652a09533e50dd0d899ab3 |
Dependencies: | Stopgaps: |
Description
sage: a,b = oo, -oo sage: a._sympy_() oo sage: b._sympy_() -------------------------------------------- AttributeError Traceback (most recent call last) /Users/.../sage-4.7.2/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.Element.__getattr__ (sage/structure/element.c:2840)() AttributeError: 'MinusInfinity' object has no attribute '_sympy_'
See this ask.sagemath.org question for background.
Attachments (1)
Change History (8)
comment:1 Changed 8 years ago by
- Keywords sd40.5 added
- Status changed from new to needs_review
comment:2 Changed 8 years ago by
- Reviewers set to Karl-Dieter Crisman
Umm, even without this patch I get
sage: import sympy sage: bool(SR(-oo) == -sympy.oo) True sage: bool(-oo == -sympy.oo) True
Am I missing something? How is that an indirect doctest?
That said, the integral works fine now and the tests pass.
comment:3 Changed 8 years ago by
Ah, those were merely mirroring the +oo cases. Really they were only testing whether the negation worked; it was the integral test which was really verifying the success. However, we can test it explicitly by adding.
sage: bool((-oo)._sympy_() == -sympy.oo) True
which fails without the patch. Modified to incorporate this.
comment:4 Changed 8 years ago by
- Status changed from needs_review to positive_review
Positive review.
comment:5 Changed 8 years ago by
- Merged in set to sage-5.1.beta4
- Resolution set to fixed
- Status changed from positive_review to closed
comment:6 Changed 5 years ago by
- Branch set to u/akhi/sympy_minus_infinity_doesn_t_convert_to_sage
comment:7 Changed 5 years ago by
- Cc rws added
- Commit set to 52db42b01c1b86c752652a09533e50dd0d899ab3
I think this ticket is already fixed?
Note: See
TracTickets for help on using
tickets.
Straightforward fix and test of the original case as an integral.