[sage-support] Re: Sage Interacts in R

2016-06-16 Thread kcrisman
> Does anyone have any experience writing interacts for R? If so, can you > post or send examples? > Hi Tom! In principle, one could write interacts using R. You would just do @interact def _(n=(5,[3..10])): L = [1..n] a = r(L) print r.median(a)

[sage-support] Re: substituting into a Sage/Python function

2016-06-16 Thread john_perry_usm
Actually, your answer stimulated a much better solution (IMHO). def test_subs(f, a, x=x): f(x) = f print f(a) Thanks for the stimulating thought. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop

Re: [sage-support] Substituting values for variables

2016-06-16 Thread Michael Orlitzky
On 06/13/2016 11:02 AM, saad khalid wrote: > Hey everyone: > > So, I start by making a symbolic function. Gamma(k) is the sum of some > variables, u_i. Generating the function by hand is difficult, so I was > hoping I could make it so that Sage generates the function and then I > can give values

[sage-support] Re: Installing Python 3 without changing Sage setup

2016-06-16 Thread Dima Pasechnik
Installing the official Python 3 from python.org will not change your default Python, it will simply add python3 and other python3* - related things. So this it perfectly fine - as long as you are happy to use python3 to run Python 3. On Thursday, June 16, 2016 at 8:46:22 AM UTC+1,

[sage-support] Re: Installing Python 3 without changing Sage setup

2016-06-16 Thread Dima Pasechnik
Installing the official Python 3 from python.org will not change your default Python, it will simply add python3 and other python3* - related things. So this it perfectly fine - as long as you are happy to use python3 to run Python 3. On Thursday, June 16, 2016 at 8:46:22 AM UTC+1,

[sage-support] Installing Python 3 without changing Sage setup

2016-06-16 Thread egunawan
Hi, is there a way to install Python 3 in my OS X Yosemite without messing up my Sage setup? I would like to continue using my Sage as before (and not have to rebuild anything), but I would like to be able to work on a Python shell using Python 3 (to do work not related to Sage). Thank you. --

[sage-support] Re: substituting into a Sage/Python function

2016-06-16 Thread Ralf Stephan
On Tuesday, June 14, 2016 at 10:07:30 PM UTC+2, john_perry_usm wrote: > > sage: f(t) = t^2 + 2 > sage: test_subs(f, 1, t) > ... > TypeError: no canonical coercion from to Callable function > ring with argument t > > I am not sure why you didn't try: sage: test_subs(f(t),1,t) 3 Of course it