-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to pynac-0.6.9 #21369
Comments
Branch: u/rws/update_to_pynac_0_6_9 |
Commit: |
comment:3
This is a regression (based on a doctest you removed): Before:
After:
|
comment:4
In general, for any doctest that you remove, it should be clearly justified why that doctest can be removed. |
comment:5
Oh well, an impasse. My justification to me personally is that I do not want to fix a feature of symbolics that is better served by algebraic structures in Sage. As it is buggy already now, and we see no complaints, I also suspect that symbolic I offer to start a sage-devel thread, and to work on a deprecation ticket in case others agree. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
For |
comment:8
Replying to @tscrim:
That is the case here if I'm not mistaken. |
comment:9
Replying to @rwst:
Please do! |
comment:13
Thanks! |
comment:14
@@ -1387,10 +1387,19 @@ cdef class Expression(CommutativeRingElement):
...
TypeError: unable to simplify to float approximation
"""
+ from sage.functions.other import real, imag
try:
- return float(self._eval_self(float))
+ ret = float(self._eval_self(float))
except TypeError:
- raise TypeError("unable to simplify to float approximation")
+ try:
+ c = (self._eval_self(complex))
+ if imag(c) == 0:
+ ret = real(c)
+ else:
+ raise
+ except TypeError:
+ raise TypeError("unable to simplify to float approximation")
+ return ret
def __complex__(self): I understand and see that it makes sense, I am just wondering which bug it fixes.
diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
index 6c4171f..d780bbc 100644
--- a/src/sage/symbolic/expression.pyx
+++ b/src/sage/symbolic/expression.pyx
@@ -1191,7 +1191,7 @@ cdef class Expression(CommutativeRingElement):
except TypeError as err:
# try the evaluation again with the complex field
# corresponding to the parent R
- if R is float:
+ if R in (float, complex):
R_complex = complex
else:
try: It seems pointless to have |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:16
Replying to @jdemeyer:
OK.
I was unable to find out why this bombed but it does so at least since Sage-7.1.
Yes but this also prevents the New commits:
New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:18
Replying to @rwst:
Can you add this as doctest then? And delete the line |
comment:19
Replying to @rwst:
And why is that a problem? Sure, it will raise an |
comment:20
I am happy with the branch on this ticket except for the |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed branch from u/rws/update_to_pynac_0_6_9 to u/jdemeyer/update_to_pynac_0_6_9 |
comment:23
I fixed the underlying cause of the New commits:
|
Reviewer: Jeroen Demeyer |
Changed author from Ralf Stephan, Erik M. Bray to Ralf Stephan, Erik M. Bray, Jeroen Demeyer |
Changed reviewer from Jeroen Demeyer to Jeroen Demeyer, Ralf Stephan |
comment:24
Is fine and passes tests. Thanks. |
comment:25
This also built without problems on Cygwin32/64 for me. |
Changed branch from u/jdemeyer/update_to_pynac_0_6_9 to |
Changed author from Ralf Stephan, Erik M. Bray, Jeroen Demeyer to Ralf Stephan, Erik Bray, Jeroen Demeyer |
Changed commit from |
Changelog:
ex::coefficients()
(rewrite buggy Expression.coefficients() without Maxima #20455)expand()
denominators too (Symbolic fractions not expanded #21302)ex::combine_fractions()
recursive (Option to combine symbolic fractions recursively #20858)normal()
options (Extend normalize() and use it instead of Maxima in simplify_rational() #21335)https://github.com/pynac/pynac/releases/download/pynac-0.6.9/pynac-0.6.9.tar.bz2
CC: @embray @tscrim @kiwifb
Component: packages: standard
Author: Ralf Stephan, Erik Bray, Jeroen Demeyer
Branch:
b06cfa0
Reviewer: Jeroen Demeyer, Ralf Stephan
Issue created by migration from https://trac.sagemath.org/ticket/21369
The text was updated successfully, but these errors were encountered: