[sage-support] how to get sage for ubuntu hardy

2009-07-16 Thread Pablo Angulo
Hello, I'm preparing a live dvd with a lot of software for next year students, and it should be based on the LTS ubuntu hardy, for a couple of reasons. There are no binaries for hardy in the mirrors, but there have been binaries in the past. I tried to compile the sources yesterday. It

[sage-support] Re: How can calculate the time of execution of a command in sage

2009-07-16 Thread Robert Bradshaw
If you want to time running something just once, see cputime() and walltime(). - Robert On Jul 15, 2009, at 12:12 PM, Gustavo Rama wrote: Thanks, I'll try it. Cheers Gustavo On Jul 14, 10:42 pm, Simon King simon.k...@uni-jena.de wrote: Hi Gustavo! On 15 Jul., 03:17, Gustavo Rama

[sage-support] Re: Cython Modules

2009-07-16 Thread Robert Bradshaw
You need include_dirs = numpy_include_dirs in your Extension(...) declaration in module_list.py. - Robert On Jul 15, 2009, at 11:23 AM, Ethan Van Andel wrote: I want to include some of my cython code as a sage module. I followed the directions for adding the .pyx file to the sage library

[sage-support] Re: Save our Souls

2009-07-16 Thread Dr. David Kirkby
Laurent wrote: Rolandb ha scritto: Hi, I’m away for three weeks and I want to let my PC doing some calculations during 20 days. Now, I’m running the risk that after a few days the computer stops et cetera, so that the results are lost. Among others precautions, you should to write

[sage-support] Re: Is it possible to replace the list built-in type in Sage?

2009-07-16 Thread Robert Bradshaw
On Jul 14, 2009, at 3:35 PM, William Stein wrote: 2009/7/14 Carlos Córdoba ccordob...@gmail.com: Thanks John, I'd seen Python comprehensions before, but since I was trying to do all in a one-liner, I think I overlooked your elegant and simple solution. One comprehension at a time is

[sage-support] Re: assume()

2009-07-16 Thread Robert Bradshaw
On Jul 14, 2009, at 9:05 AM, Doug wrote: Hmm. I've also had trouble interpreting what assume() affects, and I'm glad to hear that I'm not the only one. What Robert says here helps a lot, but is there anything written anywhere else that goes into a bit more detail? I'm sure there's more to

[sage-support] Tachyon still working?

2009-07-16 Thread Paul Sargent
Hi all, I've just tried to re-run an old worksheet that uses Tachyon to raytrace an image. I believe it worked a few versions ago, but on version 4.1 under Mac OS X (64 bit intel) I no longer get any output. No error. No image. Is anybody else having this? t6 =

[sage-support] Re: Tachyon still working?

2009-07-16 Thread Marshall Hampton
Works OK for me on a mac running 4.0.1, but doesn't work on sagenb running 4.1, so I would guess this is an issue with 4.1. I have made this trac ticket #6542: http://trac.sagemath.org/sage_trac/ticket/6542 -Marshall Hampton On Jul 16, 5:44 am, Paul Sargent psa...@gmail.com wrote: Hi all,

[sage-support] Re: Problem with larger sws files

2009-07-16 Thread kcrisman
Dear Rolandb, I'm not sure what to do about uploading the large .sws files - I'm not surprised it times out, based on my experience. However, what you might want to do is one of the two following things: 1) Go back to wherever your original worksheet came from and run the script at

[sage-support] Re: Problem with larger sws files

2009-07-16 Thread Minh Nguyen
On Thu, Jul 16, 2009 at 10:57 PM, kcrismankcris...@gmail.com wrote: SNIP 2) .sws files are really just some kind of zip file. So unzipping it will reveal the folder for the worksheet, and you can then manually remove the snapshots (assuming you don't need them currently) and then rezip it.

[sage-support] Re: Problem with larger sws files

2009-07-16 Thread Minh Nguyen
On Thu, Jul 16, 2009 at 11:23 PM, kcrismankcris...@gmail.com wrote: SNIP Sage worksheets are compressed using tar and bzip2. Say your worksheet is called myworksheet.sws, then this would uncompress it: $ tar -jxf myworksheet.sws You then get a directory containing the worksheet data.

[sage-support] Re: Cython Modules

2009-07-16 Thread Ethan Van Andel
Thank you, that did the trick. However, while everything compiles now, I cant use my stuff in the notebook. I've run sage -b and I'm pretty sure my module_list.py and setup.py entries are correct. Do I have to import or include anything? Do my entries have to be in the proper alphabetical order?

[sage-support] Re: solve() not finding all roots

2009-07-16 Thread David Joyner
Does this help any? sage: R = PolynomialRing(QQ, 2, 'x1,x2', order='lp') sage: x1,x2 = R.gens() sage: f1 = 1/2*((x1^2 + 2*x1 - 4)*x2^2 + 2*(x1^2 + x1)*x2 + x1^2) sage: f2 = 1/2*((x1^2 + 2*x1 + 1)*x2^2 + 2*(x1^2 + x1)*x2 - 4*x1^2) sage: I = (f1,f2)*R; I Ideal (1/2*x1^2*x2^2 + x1^2*x2 + 1/2*x1^2 +

[sage-support] Re: Save our Souls

2009-07-16 Thread Simon King
Hi! On 16 Jul., 10:51, Dr. David Kirkby david.kir...@onetel.net wrote: ... I've also found 'nohup' useful if running a program from a remote location, as the session does not abort if the connection dies. nohup keeps your process alive if the connection dies, but you can not interact with

[sage-support] Re: Save our Souls

2009-07-16 Thread Minh Nguyen
On Fri, Jul 17, 2009 at 1:01 AM, Simon Kingsimon.k...@uni-jena.de wrote: Hi! On 16 Jul., 10:51, Dr. David Kirkby david.kir...@onetel.net wrote: ... I've also found 'nohup' useful if running a program from a remote location, as the session does not abort if the connection dies. nohup

[sage-support] Square root problem

2009-07-16 Thread Santanu Sarkar
Suppose we want to find just integer part of square root 1000. Say B=sqrt(1000). Then how can I use digits function i,e. B.digits() to find the bits of B. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from

[sage-support] Re: Cython Modules

2009-07-16 Thread Simon King
Hi! On 16 Jul., 16:07, Ethan Van Andel evlu...@gmail.com wrote: Thank you, that did the trick. However, while everything compiles now, I cant use my stuff in the notebook. I've run sage -b  and I'm pretty sure my module_list.py and setup.py entries are correct. Do I have to import or include

[sage-support] Re: Square root problem

2009-07-16 Thread Marshall Hampton
I'm not quite sure what you want, but for example sage: B = sqrt(1000) sage: floor(B) 31 would give you the integer part (rounded down since its floor). The round() function might be what you want instead (round(B) is 32.0). -Marshall Hampton On Jul 16, 10:05 am, Santanu Sarkar

[sage-support] Constructing an odd graph

2009-07-16 Thread Taxman
Hi, I'm trying to construct an odd graph (http://en.wikipedia.org/wiki/ Odd_graph). My first thought was to use X = Set([1,2,3,4,5]) V=(X.subsets(2)) to get the desired subsets for the vertex set. That does get the subsets, but converting it into a graph doesn't seem to work. T=Graph(V) gives:

[sage-support] Re: Cython Modules

2009-07-16 Thread Ethan Van Andel
What do I import it as? if I try import module my_stuff (the folder that I saved it in, and added to the package list) it tells me there's no module of that name. If I try import my_stuff.interpolators (The extension name and the name of the .pyx file) it tells me the same thing. Thanks, Ethan

[sage-support] Re: solve() not finding all roots

2009-07-16 Thread Doug
I confess I'm not a mathematician (I'm an economist) and it's been almost 25 years since I took a basic course in abstract algebra. But this is interesting. From the wikipedia page on Grobner bases, it seems I should be able to compute solutions to the system based on the Grobner basis, but I

[sage-support] Re: Constructing an odd graph

2009-07-16 Thread javier
You need to define a function on pair of vertices that returns True if there should be an edge. Something like X = Set([1,2,3,4,5]) V=(X.subsets(2)) def s(a,b): return a.intersection(b).cardinality()==0 T = Graph([V, s]) should work, but I am getting the following weird error in sage

[sage-support] Re: solve() not finding all roots

2009-07-16 Thread Marshall Hampton
The last element of that Groebner basis is a univariate polynomial in x2, so it is relatively easy to analyze its solutions. There is one triple root at x2=0, and then four others which are presumably the four you are thinking of. Once you have a value for x2, you can substitute it into the

[sage-support] Re: Constructing an odd graph

2009-07-16 Thread javier
Ok, my own mistake. The problem is that V (the set of sets) needs to be turned into a list. This works for me now: X = Set([1,2,3,4,5]) V = list(X.subsets(2)) def s(a,b): return a.intersection(b).cardinality()==0 T = Graph([V, s]) Hope that helps Cheers Javier On Jul 16, 5:26 pm,

[sage-support] Re: Constructing an odd graph

2009-07-16 Thread Taxman
On Jul 16, 12:26 pm, javier vengor...@gmail.com wrote: You need to define a function on pair of vertices that returns True if there should be an edge. Something like X = Set([1,2,3,4,5]) V=(X.subsets(2)) def s(a,b):     return a.intersection(b).cardinality()==0 T = Graph([V, s])

[sage-support] Re: Constructing an odd graph

2009-07-16 Thread Taxman
On Jul 16, 1:00 pm, Taxman taxman4...@gmail.com wrote: T.is_isomorphic(P) gives the desired result of true. Ah sorry, P=graphs.PetersenGraph() being the P in question if anyone was curious. --~--~-~--~~~---~--~~ To post to this group, send email to

[sage-support] Re: solve() not finding all roots

2009-07-16 Thread Doug
The last element of that Groebner basis is a univariate polynomial in x2, so it is relatively easy to analyze its solutions.  There is one triple root at x2=0, and then four others which are presumably the four you are thinking of.  Once you have a value for x2, you can substitute it into

[sage-support] Re: solve() not finding all roots

2009-07-16 Thread Marshall Hampton
If phcpack does not report any 'failure' solutions in classified_solution_dicts(), then it should have found all the roots. But the groebner methods are preferable if you are interested in exact solutions. -Marshall On Jul 16, 11:29 am, Doug mcke...@gmail.com wrote: The last element of that

[sage-support] Problem building Sage 4.1 from source on CENTOS 4.7

2009-07-16 Thread RaoulV
Hi All, I have a problem while trying to build Sage version 4.1 from source on Centos 4.7: uname -a Linux linux27.dom 2.6.9-67.0.22.ELsmp #1 SMP Wed Jul 23 17:24:12 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux cat /etc/issue CentOS release 4.7 (Final) Kernel \r on an \m CPU: Intel(R) Core(TM)2 Duo

[sage-support] Re: Tachyon still working?

2009-07-16 Thread Marshall Hampton
I have added a patch that fixes this, available at: http://trac.sagemath.org/sage_trac/raw-attachment/ticket/6542/trac_6542_tachyon_tostr.patch Since tachyon is currently broken on all systems in sage-4.1, I fixed the immediate problem rather than taking the time to improve the testing of

[sage-support] integer division in sage/cython

2009-07-16 Thread Ethan Van Andel
What is the official way to correctly divide 2 integer variables in a %cython cell in a sage notebook? I know that in general you'd do from __future__ import division but it looks like the notebook doesn't like __future__ imports. I have an simple workaround, so this isn't urgent, I'd just like

[sage-support] lambda/ function calls in cython fro complex_plot

2009-07-16 Thread Ethan Van Andel
Sorry to keep spamming sage-support. I have a class instance m with a method riemann_map so that m.riemann_map(z) returns a (numpy) complex value. I want to do a complex_plot of that function. If I try: complex_plot(m.riemann_map,(-2,2),(-2,2)) I get this error: ... File fast_eval.pyx, line

[sage-support] Re: lambda/ function calls in cython fro complex_plot

2009-07-16 Thread kcrisman
On Jul 16, 3:54 pm, Ethan Van Andel evlu...@gmail.com wrote: Sorry to keep spamming sage-support. I have a class instance m with a method riemann_map so that m.riemann_map(z) returns a (numpy) complex value. I want to do a complex_plot of that function. If I try:

[sage-support] Re: how to get sage for ubuntu hardy

2009-07-16 Thread William Stein
On Thu, Jul 16, 2009 at 12:04 AM, Pablo Angulopablo.ang...@uam.es wrote:  Hello,  I'm preparing a live dvd with a lot of software for next year students, and it should be based on the LTS ubuntu hardy, for a couple of reasons. There are no binaries for hardy in the mirrors, but there have

[sage-support] Re: Problem building Sage 4.1 from source on CENTOS 4.7

2009-07-16 Thread William Stein
On Thu, Jul 16, 2009 at 10:56 AM, RaoulVraoul.vie...@gmail.com wrote: Hi All, I have a problem while trying to build Sage version 4.1 from source on Centos 4.7: uname -a Linux linux27.dom 2.6.9-67.0.22.ELsmp #1 SMP Wed Jul 23 17:24:12 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux cat /etc/issue