Re: [sage-support] What is wrong with this SAGE function?

2015-06-04 Thread Vincent Delecroix
[0] * i + [1] + [0] * (n-i-1) On 05/06/15 00:11, Michael Orlitzky wrote: On 06/04/2015 05:53 PM, Phoenix wrote: Thanks! Is there otherwise any standard operation in SAGE to create such vectors? If the construction isn't too complicated, a "list comprehension" usually suffices. This will do

[sage-support] Re: Possibly wrong limit concerning log

2015-06-04 Thread kcrisman
> > > Other examples of wrong limits with logarithm in exponent in Sage: > lim27**(log(n,3/n**3),n=infinity) returns 0 (Wolfram Alpha > > > and Maple return 1). > lim27**(l

[sage-support] Re: equivalent to Mathematica goes-to; e.g., (/. a -> 4)

2015-06-04 Thread Volker Braun
sage: var('x,a') (x, a) sage: a*sin(x) a*sin(x) sage: (a*sin(x)).subs(a=4) 4*sin(x) sage: plot((a*sin(x)).subs(a=4), x, -pi, pi) On Thursday, June 4, 2015 at 11:08:05 PM UTC+2, Ed Lazarus wrote: > > I would like the sagemath syntax for the mathematica > Plot[ a Sin[x] /.a -> 4, {x,-Pi,Pi} ]. > I

Re: [sage-support] What is wrong with this SAGE function?

2015-06-04 Thread Michael Orlitzky
On 06/04/2015 05:53 PM, Phoenix wrote: > > Thanks! > > Is there otherwise any standard operation in SAGE to create such vectors? > If the construction isn't too complicated, a "list comprehension" usually suffices. This will do what you want, I think: def elem(i,n): return [ ZZ(i == j)

Re: [sage-support] What is wrong with this SAGE function?

2015-06-04 Thread Phoenix
Thanks! Is there otherwise any standard operation in SAGE to create such vectors? If you have time can you also look into another question I had about vectors in SAGE: Given a vector $v$ and a matrix $A$ of dimension $n$, one would say that $v$ is a cyclic vector of $A$ if the following set

[sage-support] Re: equivalent to Mathematica goes-to; e.g., (/. a -> 4)

2015-06-04 Thread Phoenix
What is wrong with something like this? a = 2 plot(a*sin(x*8)^2 * e^-(x*x),x,-2,2) -- 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 email to sage-support+unsubscr...@g

Re: [sage-support] What is wrong with this SAGE function?

2015-06-04 Thread Christophe Bal
Use range(n-1) instead of range [n-1]. *Christophe BAL* *Enseignant de mathématiques en Lycée **et développeur Python amateur* *---* *French math teacher in a "Lycée" **and **Python **amateur developer* 2015-06-04 23:44 GMT+02:00 Phoenix : > > I am trying to define a function "elem" which will

[sage-support] What is wrong with this SAGE function?

2015-06-04 Thread Phoenix
I am trying to define a function "elem" which will create me a list of length n which has 1 at the i^th position. def elem (i,n): A = [] for k in range [n-1]: if k != i: A.append([0]) if k == i: A.append([1]) return A elem (1,5) Why does the above not wo

[sage-support] equivalent to Mathematica goes-to; e.g., (/. a -> 4)

2015-06-04 Thread Ed Lazarus
I would like the sagemath syntax for the mathematica Plot[ a Sin[x] /.a -> 4, {x,-Pi,Pi} ]. It seems quite difficult to do a search that will yield an answer. Thanks to whomever. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe fro

[sage-support] About running SAGE on Windows 8

2015-06-04 Thread Phoenix
Does one have to a virtual box of Oracle to run SAGE on Windows? I am currently on a Windows 8 machine. The sage-6.7.ova file that I am running through this virtual box is immensely slow! Any help? -- You received this message because you are subscribed to the Google Groups "sage-support

Re: [sage-support] Re: Make doc error

2015-06-04 Thread Viviane Pons
The problem was indeed the accent, we tried John's fix with # -*- coding: utf-8 -*- and it worked! Thank you for your help, it was kind of tricky. Best Viviane 2015-06-04 3:03 GMT-05:00 Volker Braun : > The docstring might have to be declared unicode (haven't actually looked > at it): > > def

[sage-support] Re: Possibly wrong limit concerning log

2015-06-04 Thread pcworld
> > sympy, too, finds the limit despite not recognizing the identity: > … > expr = 27**(log(x,3)/x**3) > > expr, limit(expr, x, oo) > > Your expression has "1/x^3" in its exponent. The expression from the orginal post would be 27**(log(x,3))/x**3, which SymPy correctly simplifies and finds the

Re: [sage-support] Re: Make doc error

2015-06-04 Thread Volker Braun
The docstring might have to be declared unicode (haven't actually looked at it): def foo(): u""" unicode string """ On Thursday, June 4, 2015 at 2:24:47 AM UTC+2, John H Palmieri wrote: > > Earlier in the docbuilding, I see this: > > [combinat ] building [inventory]: targets for 2 s