Re: [sage-support] issue with combining sub lists into a list

2012-01-09 Thread Dan Drake
On Mon, 09 Jan 2012 at 10:39AM -0800, Eric Kangas wrote: > Hi, > > I have a list of sublists where I would like to combine these sub > lists into one list. > > Here is my code where I created this list of sublists. I see you've gotten one answer, but I thought I would add that this is really jus

Re: [sympy] Re: [sage-support] Solving differential equations with unit_step?

2012-01-09 Thread Renan Birck Pinheiro
2012/1/9 Aaron Meurer > Thanks to Tom's Google Summer of Code project, SymPy can indeed solve > this problem. The code is only in the git master, but will be included > in SymPy 0.7.2. > This looks pretty good, I will try and compile the git version. Thanks. -- Renan Birck Pinheiro, Grupo de M

Re: [sympy] Re: [sage-support] Solving differential equations with unit_step?

2012-01-09 Thread Aaron Meurer
And I should note that Tom's code can also compute the Laplace transform if you want to do it that way: In [13]: var('s') Out[13]: s In [14]: inverse_laplace_transform(exp(-5*s)/s, s, t) Out[14]: Heaviside(t - 5) Aaron Meurer On Mon, Jan 9, 2012 at 1:36 PM, Aaron Meurer wrote: > Thanks to Tom'

Re: [sympy] Re: [sage-support] Solving differential equations with unit_step?

2012-01-09 Thread Aaron Meurer
Thanks to Tom's Google Summer of Code project, SymPy can indeed solve this problem. The code is only in the git master, but will be included in SymPy 0.7.2. In [3]: dsolve(Derivative(y(x),x) - Heaviside(-5 + x), y(x)) Out[3]: ⎧ │x│ y(x) = C₁ + 5⋅⎪

Re: [sage-support] Re: Strange interaction between sage and numpy

2012-01-09 Thread Vegard Lima
Created this ticket for the numpy array to matrix issue: http://trac.sagemath.org/sage_trac/ticket/12287 On Mon, Jan 9, 2012 at 4:20 PM, Volker Braun wrote: > Sure! I suspect it would be relatively easy to fix > in sage/matrix/constructor.py if you want to give it a try! But in any case > please

Re: [sage-support] Solving differential equations with unit_step?

2012-01-09 Thread Renan Birck Pinheiro
2012/1/9 David Joyner > AFAIK, Sage cannot at this time take the inverse Laplace transform of > something of the form e^{-5s}/s. > > And indeed it can't. sage: F = e^(-5*s)/s sage: F.inverse_laplace(s,t) ilt(e^(-5*s)/s, s, t) -- Renan Birck Pinheiro, Grupo de Microeletrônica

Re: [sage-support] Solving differential equations with unit_step?

2012-01-09 Thread David Joyner
AFAIK, Sage cannot at this time take the inverse Laplace transform of something of the form e^{-5s}/s. I think Sympy (included with Sage) can http://docs.sympy.org/dev/modules/integrals/integrals.html#integral-transforms but I don't think it's been integrated together with initial conditions: >>>

Re: [sage-support] issue with combining sub lists into a list

2012-01-09 Thread D. S. McNeil
> [[1],[2,8,4,6],[1,2,7],[9,3,4,6],...] > [[1],[14,17,18,19],[1,4,11],[9,14,16,19],...] > > would like to figure out how to get both results like this: > > [1,2,8,4,6,1,2,7,9,3,4,6,...] > [1,14,17,18,19,1,4,11,9,14,16,19...] Two ways come to mind: sage: a = [[1],[2,3,4],[5,6,7]] sage: a [[1], [2,

[sage-support] issue with combining sub lists into a list

2012-01-09 Thread Eric Kangas
Hi, I have a list of sublists where I would like to combine these sub lists into one list. Here is my code where I created this list of sublists. p = list(str(n(pi, digits = 200))) p.remove('.') p1 = [int(x) for x in p] l1 = [0,1,0,6,2,0,1,2,0,9,1,7,2,8,3,4,4,8,4,6] l31 = [[x for x,y in zip(

[sage-support] Re: Solving differential equations with unit_step?

2012-01-09 Thread Renan Birck Pinheiro
On 9 jan, 15:39, Renan Birck Pinheiro wrote: > Hi, > > I'm trying to solve a differential equation with unit step, e.g. the > equation y'(x) = U(x-5) - where U is the unit step, and the inicial > condition y(0) is 0. > sage: desolve(diff(y,x) - unit_step(x-5),y,ics=[0,1]) Oops. I made a typo

[sage-support] Solving differential equations with unit_step?

2012-01-09 Thread Renan Birck Pinheiro
Hi, I'm trying to solve a differential equation with unit step, e.g. the equation y'(x) = U(x-5) - where U is the unit step, and the inicial condition y(0) is 0. The result is 0 for 05 (it's a simple integral of the unit step function). WolframAlpha gives the correct result [1], however sage fail

Re: [sage-support] Re: Strange interaction between sage and numpy

2012-01-09 Thread Volker Braun
Sure! I suspect it would be relatively easy to fix in sage/matrix/constructor.py if you want to give it a try! But in any case please open a ticket. -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@goo

Re: [sage-support] Re: Strange interaction between sage and numpy

2012-01-09 Thread Vegard Lima
On Sun, Jan 8, 2012 at 6:23 PM, Volker Braun wrote: > Just noticed the following: > > sage: import numpy as np > sage: r=10 > sage: c=76 > sage: A = 2*np.random.randint(2, size=(r,c))-np.ones((r,c),dtype=np.int) > sage: A = matrix(QQ,A) > sage: A > 10 x 76 dense matrix over Integer Ring (type 'pri

[sage-support] Output processing and formatting delay in Notebook

2012-01-09 Thread Eugene Goldberg
Hello! This code in Sage Notebook: for i in range(7): html('alert("Text %g");' % i) time.sleep(1) gives no alert messages before cell completely calculated? Is there any way to force immediate output processing? P.S. Sorry for duplicating question, it has already posted at asksage (http