Martin Rubey <[EMAIL PROTECTED]> writes:
> OK, thanks to Bill, Mike and William the axiom interface is now mostly working
> on my computer.
>
> Mostly, because I think the following *should* work...
>
> sage: a = axiom.sin(x)
I hacked around axiom.py a little, and came up with the following:
#If all else fails, try using the unparsed input form
try:
import sage.misc.sage_eval
try:
vars = str(self.variables())[1:-1]
return
sage.misc.sage_eval.sage_eval(self.unparsed_input_form(),cmds='var(\''+vars+'\')')
except:
return sage.misc.sage_eval.sage_eval(self.unparsed_input_form())
except:
raise NotImplementedError
This takes into account the fact that in sage we have to introduce all
variables...
Unfortunately, we are still not there, because unparsed_input_form returns
'sin x'
(In FriCAS, one can omit parentheses, if a function takes only a single
argument.)
Is there an easy way to massage this string in python, or should I rather do it
in FriCAS? (I guess I should...)
Martin
--~--~---------~--~----~------------~-------~--~----~
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/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---