[sage-support] Missing 1 required positional argument

2020-01-17 Thread Pedja
The following code doesn't work inside Sage Math Cell. I am getting message: TypeError: Check() missing 1 required positional argument: 'n' . I guess I use a selector incorrectly. How can I fix it? gp.eval("xmat(r,n) = [2*x, -1; 1, 0]*Mod(1,x^r-1)*Mod(1,n);") gp.eval("smallestr(n)={if(n==1 || n%

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

2020-01-12 Thread Pedja Terzic
o(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 Pasechnik wrote: > > > > this way Python does not know anything about GP functions. > > You nee

[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