[sage-support] Re: functions in list comprehensions

2009-01-22 Thread William Stein
On Thu, Jan 22, 2009 at 10:46 PM, Robert Bradshaw wrote: > > On Jan 22, 2009, at 10:25 PM, kcrisman wrote: > >> In 3.3.alpha0, the following works fine: >> >> sage: list= [[i,j] for i in [-3..3] for j in [-3..3]] >> sage: [coords for coords in list if (coords[0])^2+(coords[1])^2-1==0] >> [[-1, 0]

[sage-support] Re: trouble in compiling .spyx files

2009-01-22 Thread mabshoff
On Jan 22, 9:14 pm, pong wrote: Hi, > I have a .spyx file which compiles and runs fine on my dept machine > (running sage-3.2.1) but I couldn't compile it on my laptop (running > sage-3.2.3 on linux). It complaints about > > Compiling spec.spyx... > Error compiling cython file: > Error compil

[sage-support] Re: functions in list comprehensions

2009-01-22 Thread Robert Bradshaw
On Jan 22, 2009, at 10:25 PM, kcrisman wrote: > In 3.3.alpha0, the following works fine: > > sage: list= [[i,j] for i in [-3..3] for j in [-3..3]] > sage: [coords for coords in list if (coords[0])^2+(coords[1])^2-1==0] > [[-1, 0], [0, -1], [0, 1], [1, 0]] > > The following doesn't terminate in a

[sage-support] functions in list comprehensions

2009-01-22 Thread kcrisman
In 3.3.alpha0, the following works fine: sage: list= [[i,j] for i in [-3..3] for j in [-3..3]] sage: [coords for coords in list if (coords[0])^2+(coords[1])^2-1==0] [[-1, 0], [0, -1], [0, 1], [1, 0]] The following doesn't terminate in a reasonable amount of time: sage: f(x,y)=x^2+y^2-1 sage: li

[sage-support] trouble in compiling .spyx files

2009-01-22 Thread pong
I have a .spyx file which compiles and runs fine on my dept machine (running sage-3.2.1) but I couldn't compile it on my laptop (running sage-3.2.3 on linux). It complaints about Compiling spec.spyx... Error compiling cython file: Error compiling spec.spyx: ... /usr/bin/ld: cannot find -lstdc++

[sage-support] Re: Can you make @interact have a variable # of input boxes...

2009-01-22 Thread Luiz Felipe Martins
> > I think it would be not too difficult to change @interact so that the > following worked: > > fields = {'a': 10, 'b': 15, 'c': 31, 'd': 14, 'e': -5} > @interact(fields) > def _(**kwargs): >sum = 0 >for fld_name in fields.iterkeys(): >sum += kwargs[fld_name] >print sum > Th

[sage-support] 3d nonlinear differential equation

2009-01-22 Thread Robert Close
I want to use MAXIMA to perform the separation of variables on a 3d nonlinear differential equation (and then solve a 1d equation). I think I can write a program to do this by trial and error with different functional forms, but I'm new to SAGE and don't want to start from scratch. Can you think

[sage-support] Re: loadin ctc.py

2009-01-22 Thread Martin Albrecht
On Thursday 22 January 2009, xhao.yap...@gmail.com wrote: > I tried to use "ctc.py" but i recieved the following error. > can any body help me? ... > -- > sage: attach "ctc.py" > ---

[sage-support] loadin ctc.py

2009-01-22 Thread xhao.yap...@gmail.com
I tried to use "ctc.py" but i recieved the following error. can any body help me? many thanx | Sage Version 3.2.3, Release Date: 2009-01-05 | | Type notebook() for the GUI, and license() for information.| -

[sage-support] Re: Can you make @interact have a variable # of input boxes...

2009-01-22 Thread Carl Witty
On Jan 22, 10:55 am, kcrisman wrote: > Luiz said: > > This worked for me, but it is definitely hackish and cumbersome. You > basically define the function in a string, exec the string to create > the function, and then use the function interact, instead using the > decoration @interact. (I've rea

[sage-support] Re: Can you make @interact have a variable # of input boxes...

2009-01-22 Thread kcrisman
Just passing this thread on to sage-support, since it more properly belongs there and some people there but not here might have comments. Also, is there any conceivable way that this sort of overloading could somehow automatically make it into the definition of how interact works, maybe via a key

[sage-support] Re: solve(2*x-3 == (2 + sqrt(x+7))^2,x)

2009-01-22 Thread Skylar
the original was actually sqrt(2*x - 3) == 2 + sqrt(x+7) if that makes a difference... hmmm On Jan 21, 1:14 pm, Marshall Hampton wrote: > x=2 is not a solution of your original system.  When you solved by > hand, presumably you squared things to eliminate the square root, but > that introduced t

[sage-support] Re: how to compute GCD of huge polynomial with degree 2^300

2009-01-22 Thread Carl Witty
On Jan 21, 1:39 am, William Stein wrote: > On Tue, Jan 20, 2009 at 9:59 PM, sea2...@gmail.com wrote: > > > Hi, > >  I want compute gcd(f,g), where f and g are polynomials and  their > > degree are huge, e.g. deg(f) is about 2^300. > >   I looked through  the Sage reference manual, and learned th

[sage-support] Ring over arbitrary Set

2009-01-22 Thread bsdz
Hi Is it possible to create a Ring over an arbitrary set in Sage? I have a Python class and would like my instances to form a Ring. I read somewhere that the built-in sage.rings.integer.Integer class inherits from the Element class to allow it to form a Ring. Is there a simpler example anywhere?

[sage-support] Hermite Normal Form

2009-01-22 Thread Paul Zimmermann
thank you Craig and William for your answers. Craig, I was using Sage 3.2, (here on a different computer): -- | Sage Version 3.2, Release Date: 2008-11-20 | | Type notebook() for the GUI, and license() for