-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
The current interface to the optional kash
package has limited utility. No way is provided to convert Kash expressions to Sage expressions, and Kash names like sage1
might be re-used even if there are outstanding references to subexpressions like sage1.1
(so this is also a bug fix, in addition to an enhancement).
This ticket fixes several bugs in the Kash interface, and allows a translation dictionary to be passed to a Kash object's sage()
method, mapping Kash objects to Sage objects, allowing conversions like this:
sage: kQ = kash.RationalField()
sage: kR = kQ.PolynomialAlgebra()
sage: R.<x> = QQ[]
sage: ka = (x^2+x).subs({x : kR.1})
sage541.1^2 + sage541.1
sage: ka.sage({kR.1: x})
x^2 + x
Also, keyword arguments are now passed correctly to Kash functions.
Component: interfaces: optional
Keywords: kash
Author: Brent Baccala
Branch/Commit: c8f01e7
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/25488