Re: [sage-support] Mixing GP and @interact inside Sage Cell

2020-01-12 Thread Pedja Terzic
Thank you, it works! On Sun, Jan 12, 2020 at 7:54 PM Dima Pasechnik wrote: > e.g. something like > > sage: gp.eval("square(x)=x^2") > '(x)->x^2' > sage: gp.function_call("square",[20]).sage() > 400 > > So one can have > > def foo(x): > return gp.function_call("square",[x]).sage() > > to crea

Re: [sage-support] Sage9.0 installation ubuntu

2020-01-12 Thread Dima Pasechnik
On Sun, Jan 12, 2020 at 7:49 PM 'Alexander Pepper' via sage-support wrote: > > installing as such, will I have any trouble importing preinstalled python > packages? this way you have another (non-system) instance of Python3 where you can install and import Python packages. > > Alex > > On Sunda

Re: [sage-support] Sage9.0 installation ubuntu

2020-01-12 Thread 'Alexander Pepper' via sage-support
installing as such, will I have any trouble importing preinstalled python packages? Alex On Sunday, January 12, 2020 at 10:46:32 AM UTC-5, Eric Gourgoulhon wrote: > > Hi, > > Le dimanche 12 janvier 2020 10:25:50 UTC+1, Jean-Florent Raymond a écrit : >> >> Hello Alex, >> >> You can download bina

Re: [sage-support] Mixing GP and @interact inside Sage Cell

2020-01-12 Thread Dima Pasechnik
e.g. something like sage: gp.eval("square(x)=x^2") '(x)->x^2' sage: gp.function_call("square",[20]).sage() 400 So one can have def foo(x): return gp.function_call("square",[x]).sage() to create a Sage function that will square a number using GP On Sun, Jan 12, 2020 at 2:26 PM Dima Pasechni

Re: [sage-support] Sage9.0 installation ubuntu

2020-01-12 Thread Eric Gourgoulhon
Hi, Le dimanche 12 janvier 2020 10:25:50 UTC+1, Jean-Florent Raymond a écrit : > > Hello Alex, > > You can download binaries at the following address: > https://www.sagemath.org/download-linux.html > There is nothing to build in this case. See the "Usage" paragraph for > instructions how to us

Re: [sage-support] Mixing GP and @interact inside Sage Cell

2020-01-12 Thread Dima Pasechnik
this way Python does not know anything about GP functions. You need to pass the input/output from/to Python. On Sun, 12 Jan 2020, 14:06 Pedja, wrote: > Why the following code doesn't work inside Sage Cell? > > gp(""" > square(x)=x^2; > """) > @interactdef _(x=2): > print(square(x)) > > -- >

[sage-support] Mixing GP and @interact inside Sage Cell

2020-01-12 Thread Pedja
Why the following code doesn't work inside Sage Cell? gp(""" square(x)=x^2; """) @interactdef _(x=2): print(square(x)) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an