[sage-support] Re: Speeding up the for loop

2008-10-09 Thread Jason Grout
Byungchul Cha wrote: > > Thanks for all of your help. I did > > 1. Importing sin and cos using "from math import sin, cos" > 2. Removing pi and sqrt out of the loops, following Jason's > suggestion: > twopi = 2*n(pi); mystep = twopi/n(sqrt(number_of_points)) > By the way, RR(pi) is faster tha

[sage-support] Re: Speeding up the for loop

2008-10-09 Thread Byungchul Cha
Thanks for all of your help. I did 1. Importing sin and cos using "from math import sin, cos" 2. Removing pi and sqrt out of the loops, following Jason's suggestion: twopi = 2*n(pi); mystep = twopi/n(sqrt(number_of_points)) and I got CPU time: 0.21 s, Wall time: 0.25 s. This looks much reasona

[sage-support] Re: problem with sagetex

2008-10-09 Thread Dan Drake
On Thu, 09 Oct 2008 at 08:23AM -0700, kcrisman wrote: > Related question: Where is the 'best' place to put the sagetex > folder? I have tried a lot of variations on the various texmf folders > (I seem to have an abundance of them, including a texmf-dist which is > where my latex looks for things.

[sage-support] Re: Sage server incredibly slow

2008-10-09 Thread William Stein
mabshoff wrote: > > > On Oct 9, 1:20 pm, Maike <[EMAIL PROTECTED]> wrote: >> Hello, > > Hii Maike, > >> I tried using the sage server at sagenb.org. Generally, it's great, >> but sometimes it's just incredibly slow. I'm having to wait about a >> minute for cells to be executed or worksheets to

[sage-support] Re: Using Sage with a large number of undergraduate students.

2008-10-09 Thread William Stein
mabshoff wrote: > > > On Oct 8, 5:48 am, Pierre <[EMAIL PROTECTED]> wrote: >>> Ironically pretty much everything works under Solaris now but the >>> notebook. I think that issue is easy to fix (RAND_MAX related >> incidentally, is it possible to get knoboo to work on solaris instead >> of the no

[sage-support] Re: Speeding up the for loop

2008-10-09 Thread William Stein
Byungchul Cha wrote: > > I am using sage for my calc III students. The following short code > produces about 500 points on a sphere. > > pts=[]; number_of_points=500 > for t1 in srange(0, pi, n(pi/sqrt(number_of_points))): > for t2 in srange(0, 2*pi, n(2*pi/sqrt(number_of_points))): > pts.

[sage-support] Re: Using Sage with a large number of undergraduate students.

2008-10-09 Thread mabshoff
On Oct 8, 5:48 am, Pierre <[EMAIL PROTECTED]> wrote: > > Ironically pretty much everything works under Solaris now but the > > notebook. I think that issue is easy to fix (RAND_MAX related > > incidentally, is it possible to get knoboo to work on solaris instead > of the notebook ? > > (sorry if

[sage-support] Re: Sage server incredibly slow

2008-10-09 Thread mabshoff
On Oct 9, 1:20 pm, Maike <[EMAIL PROTECTED]> wrote: > Hello, Hii Maike, > I tried using the sage server at sagenb.org. Generally, it's great, > but sometimes it's just incredibly slow. I'm having to wait about a > minute for cells to be executed or worksheets to be loaded or saved > sometimes.

[sage-support] Re: Speeding up the for loop

2008-10-09 Thread Jason Grout
Marshall Hampton wrote: > I think the culprit is the "pi" in the srange, which gets Maxima too > involved (and maxima as called through sage is slow). This may > improve very soon as there is some work being done to shift basic > symbolic things like "pi" to a more python-based backend. > > Anyw

[sage-support] Re: Speeding up the for loop

2008-10-09 Thread Marshall Hampton
I think the culprit is the "pi" in the srange, which gets Maxima too involved (and maxima as called through sage is slow). This may improve very soon as there is some work being done to shift basic symbolic things like "pi" to a more python-based backend. Anyway for the moment you can avoid this

[sage-support] Sage server incredibly slow

2008-10-09 Thread Maike
Hello, I tried using the sage server at sagenb.org. Generally, it's great, but sometimes it's just incredibly slow. I'm having to wait about a minute for cells to be executed or worksheets to be loaded or saved sometimes. Is everyone having these problems or am I doing something wrong? Thanks f

[sage-support] Speeding up the for loop

2008-10-09 Thread Byungchul Cha
I am using sage for my calc III students. The following short code produces about 500 points on a sphere. pts=[]; number_of_points=500 for t1 in srange(0, pi, n(pi/sqrt(number_of_points))): for t2 in srange(0, 2*pi, n(2*pi/sqrt(number_of_points))): pts.append((sin(t1)*cos(t2), sin(t1)*sin(

[sage-support] Re: Cython editor

2008-10-09 Thread Robert Bradshaw
I use xcode (OS X) and emacs. Both can be configured to recognize .pyx files as Python files, and if you can configure your Eclipse plugin to do the same that would probably be ideal for you (or, even better, modify the plugin to recognize cdef methods, etc.) On Oct 8, 2008, at 10:04 PM, ce

[sage-support] Export html cell to PDF or DVI

2008-10-09 Thread Chris Fronk
Does anyone know of a way in Sage to export the output of a %html cell to a pdf or dvi file? --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, v

[sage-support] Re: importing SAGE scripts

2008-10-09 Thread john_perry_usm
Aren't I embarassed. It's the FIRST LINE of the help screen. regards john perry On Oct 9, 12:27 pm, john_perry_usm <[EMAIL PROTECTED]> wrote: > Hi, > > I have a small library of SAGE functions. I've saved it as > somefile.py. I can import it and run it in SAGE using > > >>> import somefile.py >

[sage-support] Re: importing SAGE scripts

2008-10-09 Thread Martin Albrecht
On Thursday 09 October 2008, john_perry_usm wrote: > Hi, > > I have a small library of SAGE functions. I've saved it as > somefile.py. I can import it and run it in SAGE using > > >>> import somefile.py > >>> somefile.read_blah() > > However, this works only as long as somefile.py uses only Python

[sage-support] importing SAGE scripts

2008-10-09 Thread john_perry_usm
Hi, I have a small library of SAGE functions. I've saved it as somefile.py. I can import it and run it in SAGE using >>> import somefile.py >>> somefile.read_blah() However, this works only as long as somefile.py uses only Python commands & structures. If I try to define a PolynomialRing, it com

[sage-support] Re: problem with sagetex

2008-10-09 Thread wiso
I'm using /usr/share/texmf/tex/latex/sage /usr/share/texmf is the latex root on openSuSE On 9 Ott, 17:23, kcrisman <[EMAIL PROTECTED]> wrote: > Related question:  Where is the 'best' place to put the sagetex > folder?  I have tried a lot of variations on the various texmf folders > (I seem to ha

[sage-support] Re: problem with sagetex

2008-10-09 Thread kcrisman
Related question: Where is the 'best' place to put the sagetex folder? I have tried a lot of variations on the various texmf folders (I seem to have an abundance of them, including a texmf-dist which is where my latex looks for things. It only seems to be looking in latex/ base/, though. - kcr

[sage-support] Re: Cython editor

2008-10-09 Thread Jason Grout
Pierre wrote: > the gedit editor, shipped with ubuntu and most gnome-based systems, is > much underrated, it is in fact a very good choice. It is highly > configurable, comparable to emacs i dare say, and you use python > instead of lisp to configure it ! for example i have easily added to > gedit

[sage-support] Re: URGENT - Problem with installing sage on suse10.1

2008-10-09 Thread Ines
Hi ! How can I save worksheet on .pdf ? Regards, Ines. On 9 oct, 13:24, Ines <[EMAIL PROTECTED]> wrote: > I install gcc-4.2.4 in /usr/local > then I set LD_LIBRARY_PATH in /usr/local/lib by : > > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib > export LD_LIBRARY_PATH > > And SAGE works !

[sage-support] integer linear programming in Sage?

2008-10-09 Thread Paul Zimmermann
This may be a silly question, but integer linear programming seems to be about maximizing some quantity relative to constraints given by a matrix equality (or inequality), where everything is happening over the integers. How does this relate to finding integer solutions to a matrix

[sage-support] Re: Cython editor

2008-10-09 Thread Pierre
the gedit editor, shipped with ubuntu and most gnome-based systems, is much underrated, it is in fact a very good choice. It is highly configurable, comparable to emacs i dare say, and you use python instead of lisp to configure it ! for example i have easily added to gedit a couple of tools to lo

[sage-support] Re: URGENT - Problem with installing sage on suse10.1

2008-10-09 Thread Ines
I install gcc-4.2.4 in /usr/local then I set LD_LIBRARY_PATH in /usr/local/lib by : LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH And SAGE works ! Thank you very much, Ines. On 8 oct, 21:43, "Ines Abdeljaoued-TEJ" <[EMAIL PROTECTED]> wrote: > Hi ! > > Le Tue

[sage-support] Re: problem with sagetex

2008-10-09 Thread Jason Grout
wiso wrote: > I've some problem using sagetex with LaTeX. If I try: > > pdflatex prova.tex > sage prova.sage > > Traceback (most recent call last): > File "prova.py", line 3, in > import sagetex > ImportError: No module named sagetex > > > now I'm working in my directory, but if copy /u

[sage-support] problem with sagetex

2008-10-09 Thread wiso
I've some problem using sagetex with LaTeX. If I try: pdflatex prova.tex sage prova.sage Traceback (most recent call last): File "prova.py", line 3, in import sagetex ImportError: No module named sagetex now I'm working in my directory, but if copy /usr/share/texmf/tex/ latex/sage/saget

[sage-support] Re: integer linear programming in Sage?

2008-10-09 Thread Simon King
Dear John, On Oct 8, 10:01 pm, John H Palmieri <[EMAIL PROTECTED]> wrote: ... > This may be a silly question, but integer linear programming seems to > be about maximizing some quantity relative to constraints given by a > matrix equality (or inequality), where everything is happening over > the