[sage-support] Re: Interface to Mathematica

2015-01-30 Thread Nathan Dunfield
Unfortunately, this is a known issue http://trac.sagemath.org/ticket/13892 It has to do with a change they made in Mathematica 9. Personally, my work-around is just to use Mathematica 8, though someone has proposed an actual fix that has not yet been incorporated into Sage: http://trac.sagema

[sage-support] Re: Interface to mathematica

2009-08-16 Thread Viny
Hello! I always have the same problem, and I don't know why it doesn't work on my computer; I have sage.4.0.2 installed. --> 44 sage_stuff = sage_eval(string,locals= {'E':'E','x':'x','y':'y'}) 45 return sage_stuff 46 /usr/local/src/sage-4.0.2/local/lib/python2.5/site-packages

[sage-support] Re: Interface to mathematica

2009-08-15 Thread Minh Nguyen
Hi Felix, On Sat, Aug 15, 2009 at 11:06 PM, thelamecamel wrote: > > Hi Viny, > > The following works for me: > > def mmatosage(mma_list): ># Convert the mathematica object to a string >string = repr(mma_list) ># Convert mathematica-style {} to python style [] >string = string.repl

[sage-support] Re: Interface to mathematica

2009-08-15 Thread thelamecamel
Hi Viny, The following works for me: def mmatosage(mma_list): # Convert the mathematica object to a string string = repr(mma_list) # Convert mathematica-style {} to python style [] string = string.replace('{','[').replace('}',']') # Replace mathematica's crazy exponent notati

[sage-support] Re: Interface to mathematica

2009-08-15 Thread Viny
Hello everybody! Thanks for your help. I'm realizing that i'm definitely really bad in sage, perhaps i'll be best in another life!!lol! This is a piece of a code for changing a symbolic mathematica list expression to a sage list expression: def mmatosage(mma_list): # Convert the mathematica

[sage-support] Re: Interface to mathematica

2009-08-14 Thread Marshall Hampton
Oh right, sorry. I always do that and then remember after the syntax error... On Aug 14, 6:35 pm, William Stein wrote: > On Fri, Aug 14, 2009 at 4:32 PM, Marshall Hampton wrote: > > > You probably have to pass in the "dx" as a local variable, i.e. do > > something like > > > sage_stuff = sage_e

[sage-support] Re: Interface to mathematica

2009-08-14 Thread William Stein
On Fri, Aug 14, 2009 at 4:32 PM, Marshall Hampton wrote: > > You probably have to pass in the "dx" as a local variable, i.e. do > something like > > sage_stuff = sage_eval(expr, locals = {'dx' = 'dx'}) It's {'dx':'dx'} or something like that. Definitely not 'dx' = 'dx'. > > where expr is your m

[sage-support] Re: Interface to mathematica

2009-08-14 Thread Marshall Hampton
You probably have to pass in the "dx" as a local variable, i.e. do something like sage_stuff = sage_eval(expr, locals = {'dx' = 'dx'}) where expr is your mathematica expression. -Marshall Hampton On Aug 14, 1:49 pm, Viny wrote: > Thanks for your help Felix, with your ideas i made progresses.

[sage-support] Re: Interface to mathematica

2009-08-14 Thread Viny
Thanks for your help Felix, with your ideas i made progresses. But the problem isn't fixe yet. Since i have some symbolic variable such 'dx' in my expressions, the code's line --> 500 return eval(string, {'I': numpy.complex(0,1)}) generate this folowing error NameError: name 'dx' is not define

[sage-support] Re: Interface to mathematica

2009-08-13 Thread thelamecamel
Hi Viny, Sage's mathematica support at present seems to be geared towards sending data to mathematica and printing the results to the screen, rather than getting mathematica's results back into sage for data manipulation. So the going may be a little rough. Sage can convert its own arrays into

[sage-support] Re: Interface to mathematica

2009-08-13 Thread Jason Grout
Viny wrote: > > On 13 août, 10:47, Viny wrote: >> Hi, >> >> I have a problem of memory into maxima when it performs a symbolic >> expression of an hessian matrix. This symbolic expression of the >> hessian seems to be too big. My sage program is written using python. >> And i want to compute the

[sage-support] Re: Interface to mathematica

2009-08-13 Thread Jason Grout
Viny wrote: > Hi, > > I have a problem of memory into maxima when it performs a symbolic > expression of an hessian matrix. This symbolic expression of the > hessian seems to be too big. My sage program is written using python. > And i want to compute the hessian matrix with mathematica 6.0 in my

[sage-support] Re: Interface to mathematica

2009-08-13 Thread Viny
On 13 août, 12:26, Viny wrote: > On 13 août, 10:47, Viny wrote: > > > Hi, > > > I have a problem of memory into maxima when it performs a symbolic > > expression of an hessian matrix. This symbolic expression of the > > hessian seems to be too big. My sage program is written using python. > >

[sage-support] Re: Interface to mathematica

2009-08-13 Thread Viny
On 13 août, 10:47, Viny wrote: > Hi, > > I have a problem of memory into maxima when it performs a symbolic > expression of an hessian matrix. This symbolic expression of the > hessian seems to be too big. My sage program is written using python. > And i want to compute the hessian matrix with m