-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
maxima interface gives precedence to function dictionary instead of local variables #7661
Comments
comment:1
People run into this all the time, evidently:
|
comment:2
sage: d = var('delta') somewhere in symbolic_expression_from_maxima_element(), the string from maxima is looked up in sage.calculus.calculus._syms, which by default has 'delta': dirac_delta . So this is what's happening, next, SR() barfs on trying to turn dirac_delta into a symbolic expression, at which point people who just wanted their variable 'delta' back get confused and frustrated. sage: del sage.calculus.calculus._syms['delta'] That may not be such a good idea, however, since what sage calls dirac_delta, maxima refers to as delta. Nevertheless, since reset('delta') appears to remove delta from that dictionary, perhaps var('delta') should also do so? Of course, what happens when someone does a Laplace transform with delta as a sage variable will then come out confusing and wrong. At least the current behavior is merely broken. |
comment:3
attachment: trac_7661-maxima_convert_back.patch fixes the problem reported above, and a similar problem with function conversions back from maxima reported in #8459 comment:2. |
Author: Burcin Erocal |
comment:4
Attachment: trac_7661-maxima_convert_back.patch.gz I updated attachment: trac_7661-maxima_convert_back.patch to remove a doctest fix broken by a previous patch in my queue (#6949, This patch depends on #7748. |
comment:5
Thanks for working onthis. Is #7748 the only prerequisity? I installed three patches as described at #7748 and got the following error
|
comment:7
Hello Burcin I think that two lines should be removed from the patch
I updated your patch, it is now http://user.mendelu.cz/marik/sage/trac_7661-maxima_convert_back2.patch If everything will work, I'll return in few (several) hours with positive review (tests in functions, interfaces, symbolics and calculus passed, now running all the test). Robert |
comment:8
OK. That is one approach to solving this problem. Now we need to rebase the patch at #8237 so that it applies on top of these. Removing the offending hunk from Note that your updated patch shows you as the author. I'd appreciate it if you changed that back. Thanks. |
comment:9
Sure, it was intended as temporary patch and from this reason I did not upload to trac server unless tested. I got some doctest failures in three files. See http://boxen.math.washington.edu/home/marik/ and the files a, b and c. I think that b is simple to fix, but have no idea about a and c. |
Attachment: trac_7661-maxima_convert_back.take2.patch.gz apply only this patch |
comment:11
Thanks a lot for the quick feedback.
|
comment:12
I tested it on a fresh install and seems that all a,b,c are resolved. |
comment:13
Tests passed, postive review, thanks for fixing - very very usefull ticket. Release manager: apply only trac_7661-maxima_convert_back.take2.patch |
Reviewer: Robert Mařík |
comment:14
Merged "trac_7661-maxima_convert_back.take2.patch" in 4.4.alpha0 |
Merged: sage-4.4.alpha0 |
From the sage-devel thread:
http://groups.google.com/group/sage-devel/t/c89582242c83a349
On 4.3.rc0, I get this:
The Maxima interface seems to give precedence to the global function
dictionary instead of the local variables when converting Maxima output
back to Sage expressions.
CC: @robert-marik
Component: interfaces
Keywords: maxima
Author: Burcin Erocal
Reviewer: Robert Mařík
Merged: sage-4.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/7661
The text was updated successfully, but these errors were encountered: