[sage-support] Re: Problem
On May 21, 2008, at 21:14 , Roland van den Brink wrote: > The following problem occured and I don't understand what the > mistake is using isqrt. Please help. Thanks in advance. > I use Sage 3.0.0. Roland > > sage: for n in range(1,10): > ...print n, isqrt(n) > 1 > Traceback (most recent call last): > File "", line 1, in > File "/home/notebook/sage_notebook/worksheets/admin/16/code/7.py", > line 6, in >exec compile(ur'for n in range(Integer(1),Integer(10)):\u000a > print n, isqrt(n)' + '\n', '', 'single') > File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/ > plotting/", line 2, in > > File "/usr/local/sage/local/lib/python2.5/site-packages/sage/misc/ > functional.py", line 956, in isqrt >raise NotImplementedError > NotImplementedError This looks like a bug: sage: for n in range(1,10): print n, isqrt(Integer(n)) : 1 1 2 1 3 1 4 2 5 2 6 2 7 2 8 2 9 3 isqrt() doesn't like 'int' arguments. Thoughts? Justin -- Justin C. Walker, Curmudgeon-At-Large Institute for the Absorption of Federal Funds Men are from Earth. Women are from Earth. Deal with it. --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Problem
The following problem occured and I don't understand what the mistake is using isqrt. Please help. Thanks in advance. I use Sage 3.0.0. Roland sage: for n in range(1,10): ...print n, isqrt(n) 1 Traceback (most recent call last): File "", line 1, in File "/home/notebook/sage_notebook/worksheets/admin/16/code/7.py", line 6, in exec compile(ur'for n in range(Integer(1),Integer(10)):\u000a print n, isqrt(n)' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/plotting/", line 2, in File "/usr/local/sage/local/lib/python2.5/site-packages/sage/misc/functional.py", line 956, in isqrt raise NotImplementedError NotImplementedError --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Problem
The following problem occured and I don't understand what the mistake is using isqrt. Please help. Thanks in advance. I use Sage 3.0.0. Roland sage: for n in range(1,10): ...print n, isqrt(n) 1 Traceback (most recent call last): File "", line 1, in File "/home/notebook/sage_notebook/worksheets/admin/16/code/7.py", line 6, in exec compile(ur'for n in range(Integer(1),Integer(10)):\u000a print n, isqrt(n)' + '\n', '', 'single') File "/usr/local/sage/local/lib/python2.5/site-packages/sympy/ plotting/", line 2, in File "/usr/local/sage/local/lib/python2.5/site-packages/sage/misc/ functional.py", line 956, in isqrt raise NotImplementedError NotImplementedError --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: simple way to link libraries to .pyx in sage?
I stuck this code in at the end of the ext_modules list in setup.py: Extension("pyrna", ["pyrna.pyx"],library_dirs=['/home/thomas/ ViennaRNA-1.7/lib'], libraries=['RNA'],include_dirs=['/home/thomas/ ViennaRNA-1.7/H']) After I pasted that in I realized I was mixing quotes, and changed the first two arguments to 'pyrna' and 'pyrna.pyx'. It compiled fine after I made this change. It's unclear to me why it worked in the initial huge build, but I'm glad it's working. Thank you both for the swift replies. Thomas On May 21, 7:41 pm, mabshoff <[EMAIL PROTECTED] dortmund.de> wrote: > On May 22, 2:04 am, tkeller <[EMAIL PROTECTED]> wrote: > > Hi Thomas, > > > You were correct, it doesn't try to rebuild everything, just modules > > that have changed. However, I am now getting the following error > > message: > > running build_ext > > building 'pyrna' extension > > error: unknown file type '.pyx' (from 'pyrna.pyx') > > sage: There was an error installing modified sage library code. > > Do you link any C/C++ glue code in there? Can you post the exact code > you use to build the extension? Often this is solved by "touching" the > extension that setup.py complains about. > > > This error didn't occur during the first, complete build. The only > > thing I changed was adding a dummy function so that it would rebuild > > the module. Removing it doesn't affect the error, so I don't think it > > is that. > > Thomas > > > > Cheers, > > Michael --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: simple way to link libraries to .pyx in sage?
On May 22, 2:04 am, tkeller <[EMAIL PROTECTED]> wrote: Hi Thomas, > You were correct, it doesn't try to rebuild everything, just modules > that have changed. However, I am now getting the following error > message: > running build_ext > building 'pyrna' extension > error: unknown file type '.pyx' (from 'pyrna.pyx') > sage: There was an error installing modified sage library code. Do you link any C/C++ glue code in there? Can you post the exact code you use to build the extension? Often this is solved by "touching" the extension that setup.py complains about. > This error didn't occur during the first, complete build. The only > thing I changed was adding a dummy function so that it would rebuild > the module. Removing it doesn't affect the error, so I don't think it > is that. > Thomas Cheers, Michael --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running a sage server
On Wed, May 21, 2008 at 5:24 PM, Drew Whitehouse <[EMAIL PROTECTED]> wrote: > > Thanks William, > > I'd seen the chroot jail document, but I hadn't seen the extra options > via notebook?. What I was looking for was to see how people set things > up to run at boot time, presumably via an /etc/init.d script and uid > that is dedicated to sage and/or specified by the server_pool option ? > > -Drew Yep. I don't know a good description of this. I personally start sagenb.org manually when I reboot that machine (which is rare). The main issue is running sage as the right user. William --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running a sage server
Thanks William, I'd seen the chroot jail document, but I hadn't seen the extra options via notebook?. What I was looking for was to see how people set things up to run at boot time, presumably via an /etc/init.d script and uid that is dedicated to sage and/or specified by the server_pool option ? -Drew On Thu, May 22, 2008 at 10:06 AM, William Stein <[EMAIL PROTECTED]> wrote: > > On Wed, May 21, 2008 at 4:00 PM, Drew Whitehouse > <[EMAIL PROTECTED]> wrote: >> >> Yes. Sorry, I should have been more explicit. >> >> -Drew > > (1) Type > sage: notebook? > and read what it says, and > > (2) Read section for of > > http://sagemath.org/doc/html/inst/index.html > > And definitely ask questions on the list if you get stuck. > > William > > > > -- Drew Whitehouse ANU Supercomputer Facility Vizlab --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running a sage server
On Wed, May 21, 2008 at 4:00 PM, Drew Whitehouse <[EMAIL PROTECTED]> wrote: > > Yes. Sorry, I should have been more explicit. > > -Drew (1) Type sage: notebook? and read what it says, and (2) Read section for of http://sagemath.org/doc/html/inst/index.html And definitely ask questions on the list if you get stuck. William --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: simple way to link libraries to .pyx in sage?
You were correct, it doesn't try to rebuild everything, just modules that have changed. However, I am now getting the following error message: running build_ext building 'pyrna' extension error: unknown file type '.pyx' (from 'pyrna.pyx') sage: There was an error installing modified sage library code. This error didn't occur during the first, complete build. The only thing I changed was adding a dummy function so that it would rebuild the module. Removing it doesn't affect the error, so I don't think it is that. Thomas On May 21, 6:46 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > On May 21, 2008, at 4:21 PM, tkeller wrote: > > > > > Hi folks, > > Let me say from the start that I've really enjoyed stumbling across > > sage; it's been a good motivator to learn more python. One thing I've > > been thinking about recently was adapting a evolutionary simulation > > project written in c to python. The crux I've reached is that it > > depends on a C library called ViennaRNA. Wrapping libraries is new to > > me, but after stumbling through for a day I got the functions I needed > > working in cython, which I then installed to my regular python > > distro. > > > My question is: Is there an easy way to load .pyx files in sage that > > require a linked library or install in a similar fashion to regular > > python ala distutils? > > There is not yet a way to specify this in the .pyx file itself, but > it has been discussed and would be nice. > > > All I came across in the docs was adding the > > module to the giant sage setup.py and then rebuilding with sage -br. > > I'm currently doing this and have every expectation for it to work, > > but it seems a bit ungainly, since it has to rebuild all of the > > modules. > > It only needs to rebuild all the modules once (which will be the > first time you do sage -br if you downloaded a binary build), after > that it will only build the needed ones. Or is it trying to rebuild > the entire thing every time? > > - Robert --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running a sage server
Yes. Sorry, I should have been more explicit. -Drew On Thu, May 22, 2008 at 9:55 AM, Drew Whitehouse <[EMAIL PROTECTED]> wrote: > Yes. Sorry, I should have been more explicit. > > -Drew > > On Thu, May 22, 2008 at 8:19 AM, William Stein <[EMAIL PROTECTED]> wrote: >> >> On Wed, May 21, 2008 at 1:33 PM, Drew <[EMAIL PROTECTED]> wrote: >>> >>> Hi, >>> >>> Is there any documentation that describes how to set up a persistent >>> multi-user sage server ? A quick google around didn't turn up >>> anything, but maybe I missed something obvious ? >>> >>> -Drew >> >> Do you mean a Sage *Notebook* server, e.g., like sagenb.org? >> >> William >> >> >> >> > > > > -- > Drew Whitehouse > ANU Supercomputer Facility Vizlab > -- Drew Whitehouse ANU Supercomputer Facility Vizlab --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: simple way to link libraries to .pyx in sage?
On May 21, 2008, at 4:21 PM, tkeller wrote: > > Hi folks, > Let me say from the start that I've really enjoyed stumbling across > sage; it's been a good motivator to learn more python. One thing I've > been thinking about recently was adapting a evolutionary simulation > project written in c to python. The crux I've reached is that it > depends on a C library called ViennaRNA. Wrapping libraries is new to > me, but after stumbling through for a day I got the functions I needed > working in cython, which I then installed to my regular python > distro. > > My question is: Is there an easy way to load .pyx files in sage that > require a linked library or install in a similar fashion to regular > python ala distutils? There is not yet a way to specify this in the .pyx file itself, but it has been discussed and would be nice. > All I came across in the docs was adding the > module to the giant sage setup.py and then rebuilding with sage -br. > I'm currently doing this and have every expectation for it to work, > but it seems a bit ungainly, since it has to rebuild all of the > modules. It only needs to rebuild all the modules once (which will be the first time you do sage -br if you downloaded a binary build), after that it will only build the needed ones. Or is it trying to rebuild the entire thing every time? - Robert --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: interact in published worksheets?
On Wed, May 21, 2008 at 4:23 PM, Timothy Clemans <[EMAIL PROTECTED]> wrote: > > This is a feature to prevent untrusted users from evaluating nasty code. Yep. However, we definitely *intend* to make it possible to run a Sage Interact server that anybody can use. It just hasn't been written yet. Writing this is a big part of Igor Tolkov's Google Summer of Code Sage project. > > On Wed, May 21, 2008 at 4:00 PM, john_perry_usm <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I've been messing with interact, very nice! However, in a published >> worksheet it doesn't interact, in fact it doesn't seem to do anything. >> A user has to login & edit the worksheet before interacting works. >> >> Or have I done something wrong? >> >> thanks >> john perry >> > >> > > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: interact in published worksheets?
This is a feature to prevent untrusted users from evaluating nasty code. On Wed, May 21, 2008 at 4:00 PM, john_perry_usm <[EMAIL PROTECTED]> wrote: > > Hi, > > I've been messing with interact, very nice! However, in a published > worksheet it doesn't interact, in fact it doesn't seem to do anything. > A user has to login & edit the worksheet before interacting works. > > Or have I done something wrong? > > thanks > john perry > > > --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] simple way to link libraries to .pyx in sage?
Hi folks, Let me say from the start that I've really enjoyed stumbling across sage; it's been a good motivator to learn more python. One thing I've been thinking about recently was adapting a evolutionary simulation project written in c to python. The crux I've reached is that it depends on a C library called ViennaRNA. Wrapping libraries is new to me, but after stumbling through for a day I got the functions I needed working in cython, which I then installed to my regular python distro. My question is: Is there an easy way to load .pyx files in sage that require a linked library or install in a similar fashion to regular python ala distutils? All I came across in the docs was adding the module to the giant sage setup.py and then rebuilding with sage -br. I'm currently doing this and have every expectation for it to work, but it seems a bit ungainly, since it has to rebuild all of the modules. I'm using ubuntu 8.04 if that matters. Regards, Thomas Keller --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] interact in published worksheets?
Hi, I've been messing with interact, very nice! However, in a published worksheet it doesn't interact, in fact it doesn't seem to do anything. A user has to login & edit the worksheet before interacting works. Or have I done something wrong? thanks john perry --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: running a sage server
On Wed, May 21, 2008 at 1:33 PM, Drew <[EMAIL PROTECTED]> wrote: > > Hi, > > Is there any documentation that describes how to set up a persistent > multi-user sage server ? A quick google around didn't turn up > anything, but maybe I missed something obvious ? > > -Drew Do you mean a Sage *Notebook* server, e.g., like sagenb.org? William --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Anybody have a SPEC file to build a Fedora RPM or configure script for Debian for SAGE 3.0.1
On Wed, May 21, 2008 at 12:43 PM, PJ <[EMAIL PROTECTED]> wrote: > > Today in the Fedora Linux list, a person asked if there was a Fedora > project to build & distribute SAGE. He spoke with such enthusiasm > about SAGE that I became interested to see what it does and I'm > compiling it right now (I figure there's no point in trying to package > it for Fedora if I can't compile it). I didn't read your README all > the way through before the make started--then I did. Its been going > about 1 hour so far. Holy cow. The good news is that all of the > prerequisites seem to be available and were already installed in my > system. (Without a "configure" script to scan for prereqs and refuse > to build without them, I'm not entirely sure.) It runs a configure process implicitly as part of the first package it installs and will refuse to continue if you don't have the prerequisites. > > If there is an effort to package SAGE for Fedora, please let me know. > I don't find one after some searching. If anybody has a spec file to There's a lot of work going into packaging sage for Debian. See e.g., http://groups.google.com/group/debian-sage > build an RPM for current SAGE, I'd appreciate seeing it. Or if you > have a Debian package configure file, I think I could convert. The > only lead I've found so far is that PCLinuxOS, which is an RPM based > distribution, offers version 2.0.2 of SAGE in rpm format. I've been > studying that spec file and it appears to me that some changes in the > build/install procedure have changed in SAGE itself, at lest if I'm > understanding the SAGE README.txt file. PCLinuxOS packaging is enough > different from Fedora that I'll wrestle with the details. > > The build & install procedure for SAGE 3.0.1 is different from almost > all GNU software in Fedora, where you type "configure ..." "make" and > "make install DESTDIR=xxx" in a "build root" environment. > > I'm curious about a few things in particular. > > 1. About the lack of "make install". Is it correct that after running > "make", then I can run > > $ sage -bdist 3.0.1 > > and the result that gets deposited in "dist" is a complete, self > contained set of files that includes everything needed to run SAGE and > nothing else? (no source code, etc?). That resulting directory > "dist" can be relocated anywhere and SAGE will still run? Yes. > > 2. What does SAGE's build do if it can't find something it wants, such > as a python devel package or McCauley2? Don't you think a > "configure" script for SAGE would be a good idea? The build takes so > long, it seems like a waste that it doesn't check development > libraries at the start and report back on what it can/can't find. The only prerequisites to build/install/use Sage are gcc, g++, make, m4, perl, ranlib, and tar These are checked when Sage first starts building. > I > "thought" I had the prerequisites because I have everything mentioned > in the README. However, the PCLinuxOS setup has several development > libraries I don't think I have. Here's a list of some build > requirements that they list: > > BuildRequires: python-scons > BuildRequires: libgfortran > BuildRequires: ntl-devel > BuildRequires: libgd-devel > BuildRequires: libopencdk-develsage-2.9.3-2gri65072007.src.rpm > BuildRequires: libgpg-error-devel > BuildRequires: libgcrypt-devel > BuildRequires: libgnutls-devel > BuildRequires: gnutls > BuildRequires: scons > BuildRequires: libsqlite3_0-devel > BuildRequires: mercurial > BuildRequires: libfac > BuildRequires: clisp > BuildRequires: python-gd > BuildRequires: IPython > BuildRequires: R-base > > They have R in the list. That's cool, I like R! But I can't say for > sure Sage includes R. You're might be building R right now. > 3. I do not understand the README comment 9, on installing GAP. That is not a comment on installing GAP but on installing the optional GAP database package. > Once > SAGE is installed from RPM, users won't have authority to do this for > themselves, so I better try to take care of it. It's far less necessary than we suggest in 9. It used to be a very important thing to do when most Sage users were number theorists. Now I bet at most 0.1% of Sage users actually install that optional database. In fact, I don't. We should change the README.txt. > I suppose you want > those things packaged as optional additional components for the SAGE > program? Or do you rather have them in the one-giant-rpm file? I > understand > > $ ./sage -optional > > I don't understand the instructions "then installing (with ./sage -i) > the package whose name > begins with database_gap. " > > I suppose I mean to say, is there a way I can just download those > additional database files by http or ftp and then install them without > being interactive with SAGE. > I wouldn't worry about optional stuff for now. > And, I suppose most importantly, if I run "sage -bdist 3.0.1", will > those optional database
[sage-support] Re: Sage Question: Computing torsion subgroups of ECs over arbitrary number fields
I actually started to implement this at some point, but I gave up when I realised that there was no 'reduction' of the curve at places of the number field. I will have look at this now, maybe I can do it now. Once one has bounded the possible torsion, it could be better to compute a complex approximation to the q-torsion point and find a point over K close by, rather than solving the division polynomial over K. But this would not allow one to prove that there is no q- torsion. Chris. --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] running a sage server
Hi, Is there any documentation that describes how to set up a persistent multi-user sage server ? A quick google around didn't turn up anything, but maybe I missed something obvious ? -Drew --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Contour-plot of Weierstrass-p-Function
Marshall Hampton wrote: > I still get Pari errors when I do what you are describing - did you > actually get that to work? No, I got a pari error too. > On May 21, 11:27 am, Jason Grout <[EMAIL PROTECTED]> wrote: >> Marshall Hampton wrote: >>> I thought it would be cool to see a vector field plot with the real >>> and imaginary parts, but for some reason it doesn't work. Anyone know >>> why not? >>> i=CDF.0 >>> tau=i >>> Om=pari([1,tau]) >>> var('x,y') >>> def g(a,b): >>> q = CDF(Om.ellwp(a+b*i)) >>> return (float(q.real()),float(q.imag())) >>> plot_vector_field(g(x,y), (.1,.9), (.1,.9)) >> plot_vector_field takes two functions currently. I don't see any reason >> it shouldn't be extended to take one function that returned two outputs, >> though. >> >> For now, at the cost of doing twice the computations, you could do >> something like: >> >> plot_vector_field((g_real(x,y), g_imag(x,y)), ...) >> >> where g_real and g_imag return the real and imaginary parts of g(x,y) >> >> Jason > > > --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Contour-plot of Weierstrass-p-Function
I still get Pari errors when I do what you are describing - did you actually get that to work? -M. Hampton On May 21, 11:27 am, Jason Grout <[EMAIL PROTECTED]> wrote: > Marshall Hampton wrote: > > I thought it would be cool to see a vector field plot with the real > > and imaginary parts, but for some reason it doesn't work. Anyone know > > why not? > > > i=CDF.0 > > tau=i > > Om=pari([1,tau]) > > var('x,y') > > def g(a,b): > > q = CDF(Om.ellwp(a+b*i)) > > return (float(q.real()),float(q.imag())) > > plot_vector_field(g(x,y), (.1,.9), (.1,.9)) > > plot_vector_field takes two functions currently. I don't see any reason > it shouldn't be extended to take one function that returned two outputs, > though. > > For now, at the cost of doing twice the computations, you could do > something like: > > plot_vector_field((g_real(x,y), g_imag(x,y)), ...) > > where g_real and g_imag return the real and imaginary parts of g(x,y) > > Jason --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Anybody have a SPEC file to build a Fedora RPM or configure script for Debian for SAGE 3.0.1
PJ wrote: Hi PJ, > Today in the Fedora Linux list, a person asked if there was a Fedora > project to build & distribute SAGE. He spoke with such enthusiasm > about SAGE that I became interested to see what it does and I'm > compiling it right now (I figure there's no point in trying to package > it for Fedora if I can't compile it). I didn't read your README all > the way through before the make started--then I did. Its been going > about 1 hour so far. Holy cow. The good news is that all of the > prerequisites seem to be available and were already installed in my > system. (Without a "configure" script to scan for prereqs and refuse > to build without them, I'm not entirely sure.) > > If there is an effort to package SAGE for Fedora, please let me know. Check out http://fedoraproject.org/wiki/SIGs/SciTech/SAGE > I don't find one after some searching. If anybody has a spec file to > build an RPM for current SAGE, I'd appreciate seeing it. Or if you > have a Debian package configure file, I think I could convert. Check out http://wiki.sagemath.org/DebianSAGE All the Debian config files are inside the individual spkgs in the dist directory. That actually results in individual packages and for Debian only about 25 components on the 80 or so in Sage need to be packaged. That approach does lead to some compatibility and testing issues, but the monolithic approach is unlikely to work for distributions. Note that Sage aims to work on much more than just Linux, so the old "why do you not use what is available on the system" approach does not work. There are reasons not to do that on Linux either, but I don't want to rant here. > The > only lead I've found so far is that PCLinuxOS, which is an RPM based > distribution, offers version 2.0.2 of SAGE in rpm format. I've been > studying that spec file and it appears to me that some changes in the > build/install procedure have changed in SAGE itself, at lest if I'm > understanding the SAGE README.txt file. PCLinuxOS packaging is enough > different from Fedora that I'll wrestle with the details. Well, AFAIK that is the only rpm based packaging effort I am aware of that got somewhere. Some people are also working on Gentoo ebuilds, but I am pretty sure that won't help much. > The build & install procedure for SAGE 3.0.1 is different from almost > all GNU software in Fedora, where you type "configure ..." "make" and > "make install DESTDIR=xxx" in a "build root" environment. > > I'm curious about a few things in particular. > > 1. About the lack of "make install". Is it correct that after running > "make", then I can run > > $ sage -bdist 3.0.1 > > and the result that gets deposited in "dist" is a complete, self > contained set of files that includes everything needed to run SAGE and > nothing else? (no source code, etc?). That resulting directory > "dist" can be relocated anywhere and SAGE will still run? Untar the resulting archive, unpack it and it is good to go. > 2. What does SAGE's build do if it can't find something it wants, such > as a python devel package or McCauley2? Don't you think a > "configure" script for SAGE would be a good idea? Nope. > The build takes so > long, it seems like a waste that it doesn't check development > libraries at the start and report back on what it can/can't find. We build *everything* from source, exceptions are maybe iconv and a couple other system libraries. >I "thought" I had the prerequisites because I have everything mentioned > in the README. However, the PCLinuxOS setup has several development > libraries I don't think I have. Here's a list of some build > requirements that they list: > > BuildRequires:python-scons > BuildRequires:libgfortran > BuildRequires:ntl-devel > BuildRequires:libgd-devel > BuildRequires:libopencdk-develsage-2.9.3-2gri65072007.src.rpm > BuildRequires:libgpg-error-devel > BuildRequires:libgcrypt-devel > BuildRequires:libgnutls-devel > BuildRequires:gnutls > BuildRequires:scons > BuildRequires:libsqlite3_0-devel > BuildRequires:mercurial > BuildRequires:libfac > BuildRequires:clisp > BuildRequires:python-gd > BuildRequires:IPython > BuildRequires:R-base Sage builds all of the above from source [the exception is fortran for which we use binaries]. That spec file removed certain bits from Sage that are provided by PCLinux OS to make the build quicker and the binary smaller. > They have R in the list. That's cool, I like R! But I can't say for > sure > > 3. I do not understand the README comment 9, on installing GAP. Once > SAGE is installed from RPM, users won't have authority to do this for > themselves, so I better try to take care of it. I suppose you want > those things packaged as optional additional components for the SAGE > program? Or do you rather have them in the one-giant-rpm file? I > understand Individual rpms would
[sage-support] Anybody have a SPEC file to build a Fedora RPM or configure script for Debian for SAGE 3.0.1
Today in the Fedora Linux list, a person asked if there was a Fedora project to build & distribute SAGE. He spoke with such enthusiasm about SAGE that I became interested to see what it does and I'm compiling it right now (I figure there's no point in trying to package it for Fedora if I can't compile it). I didn't read your README all the way through before the make started--then I did. Its been going about 1 hour so far. Holy cow. The good news is that all of the prerequisites seem to be available and were already installed in my system. (Without a "configure" script to scan for prereqs and refuse to build without them, I'm not entirely sure.) If there is an effort to package SAGE for Fedora, please let me know. I don't find one after some searching. If anybody has a spec file to build an RPM for current SAGE, I'd appreciate seeing it. Or if you have a Debian package configure file, I think I could convert. The only lead I've found so far is that PCLinuxOS, which is an RPM based distribution, offers version 2.0.2 of SAGE in rpm format. I've been studying that spec file and it appears to me that some changes in the build/install procedure have changed in SAGE itself, at lest if I'm understanding the SAGE README.txt file. PCLinuxOS packaging is enough different from Fedora that I'll wrestle with the details. The build & install procedure for SAGE 3.0.1 is different from almost all GNU software in Fedora, where you type "configure ..." "make" and "make install DESTDIR=xxx" in a "build root" environment. I'm curious about a few things in particular. 1. About the lack of "make install". Is it correct that after running "make", then I can run $ sage -bdist 3.0.1 and the result that gets deposited in "dist" is a complete, self contained set of files that includes everything needed to run SAGE and nothing else? (no source code, etc?). That resulting directory "dist" can be relocated anywhere and SAGE will still run? 2. What does SAGE's build do if it can't find something it wants, such as a python devel package or McCauley2? Don't you think a "configure" script for SAGE would be a good idea? The build takes so long, it seems like a waste that it doesn't check development libraries at the start and report back on what it can/can't find. I "thought" I had the prerequisites because I have everything mentioned in the README. However, the PCLinuxOS setup has several development libraries I don't think I have. Here's a list of some build requirements that they list: BuildRequires: python-scons BuildRequires: libgfortran BuildRequires: ntl-devel BuildRequires: libgd-devel BuildRequires: libopencdk-develsage-2.9.3-2gri65072007.src.rpm BuildRequires: libgpg-error-devel BuildRequires: libgcrypt-devel BuildRequires: libgnutls-devel BuildRequires: gnutls BuildRequires: scons BuildRequires: libsqlite3_0-devel BuildRequires: mercurial BuildRequires: libfac BuildRequires: clisp BuildRequires: python-gd BuildRequires: IPython BuildRequires: R-base They have R in the list. That's cool, I like R! But I can't say for sure 3. I do not understand the README comment 9, on installing GAP. Once SAGE is installed from RPM, users won't have authority to do this for themselves, so I better try to take care of it. I suppose you want those things packaged as optional additional components for the SAGE program? Or do you rather have them in the one-giant-rpm file? I understand $ ./sage -optional I don't understand the instructions "then installing (with ./sage -i) the package whose name begins with database_gap. " I suppose I mean to say, is there a way I can just download those additional database files by http or ftp and then install them without being interactive with SAGE. And, I suppose most importantly, if I run "sage -bdist 3.0.1", will those optional database files be included? 4. Another packaging problem is that the name "sage" is already claimed in Fedora by an OpenGL library, and I expect they won't approve a package called SAGE. I was wondering if you support /oppose a name like "sagemath". --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting x^x
On Wed, May 21, 2008 at 11:45 AM, mark mcclure <[EMAIL PROTECTED]> wrote: > > On May 21, 1:07 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > >> Since I know a bit more about how to optimize code in Sage, >> I redid your function but using more tricks. The result draws >> the above in 0.09 seconds (yep!). > > And Marshall wrote: >> Arg, you beat me to it. I have a solution that takes about twice as >> long as yours; I didn't you could use _fast_float_ like that: > > Hey thanks guys! Maybe, I'll learn these little tricks sometime, too. > > Mark Much better would be for Sage to improve so these tricks aren't needed. I see that happening :-) William --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting x^x
On May 21, 1:07 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > Since I know a bit more about how to optimize code in Sage, > I redid your function but using more tricks. The result draws > the above in 0.09 seconds (yep!). And Marshall wrote: > Arg, you beat me to it. I have a solution that takes about twice as > long as yours; I didn't you could use _fast_float_ like that: Hey thanks guys! Maybe, I'll learn these little tricks sometime, too. Mark --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting x^x
Arg, you beat me to it. I have a solution that takes about twice as long as yours; I didn't you could use _fast_float_ like that: import math mypi = float(pi) def f(x,k): if x > 0: tz = math.exp(x*(math.log(x))) return[x,tz*math.cos(2*mypi*k*x),tz*math.sin(2*mypi*k*x)] if x < 0: tz = math.exp(x*(math.log(-x))) return[x,tz*math.cos(mypi*(2*k+1)*x),tz*math.sin(mypi*(2*k +1)*x)] else: return [0, 1, 0] dx = float(0.02) pic = line([[0,1,0],[0,1,0]]); for k in srange(-3,4,float(1)): pts = [f(x,k) for x in srange(-4.0,2.0,dx)] pic = pic + line3d(pts) -M. Hampton On May 21, 12:07 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On Wed, May 21, 2008 at 9:18 AM, mark mcclure <[EMAIL PROTECTED]> wrote: > > > On May 16, 2:44 am, Dan Pillone <[EMAIL PROTECTED]> wrote: > > >> Is there a way to plot x^x correctly? > > > A lovely article by Mark Meyerson entitled "The x^x Spindle" > > appeared in Mathematics Magazine back in June of 96. The > > article shows how to interpret the graph of x^x in 3-space, > > using the complex values of x^x. This may be plotted in > > sage as follows: > > > def f(x,k): > >if x != 0: > >z = exp(x*(maxima.log(x) + 2*I*pi*k)) > >return [x, real(z), imag(z)] > >else: > >return [0, 1, 0] > > dx = 0.02 > > pic = line([[0,1,0],[0,1,0]]); > > for k in range(-3,4): > >points = [f(x*dx,k) for x in range(-4/dx,2/dx)] > >pic = pic + line(points) > > pic.show(frame_aspect_ratio=[2,1,1], figsize=8) > > > The above commands take *way* too long, presumably due to the > > repeated calls to maxima's complex log function. Sage's log > > function doesn't work. I was able to perform the loop in > > maxima, but I was unable to get the result back into sage for > > plotting. > > > The result is quite nice, though. There are countably many > > Yep. > > Since I know a bit more about how to optimize code in Sage, > I redid your function but using more tricks. The result draws > the above in 0.09 seconds (yep!). > > See attached or > > https://www.sagenb.org/home/pub/1831/ > > -- William > > > different threads, corresponding to the different branches of > > the complex log; they all spiral about the x-axis. You can > > see the graph here: > >https://www.sagenb.org/home/pub/1830/ > > > The published notebook also shows a plot of x^x for x>0 > > together with points of the form (-p/q)^(-p/q) for odd q. > > These points all lie where one of the threads pierces the > > x-re(z) plane. > > > > Plot_branches_of_x_x_efficiently.sws > 81KDownload > > Picture 3.png > 41KViewDownload --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: getting the coordinates of the vertices of a drawn graph
Nikos Apostolakis wrote: > Hello, > > is there a way to get the the coordinates of the points where the > vertices of a graph would be placed if drawn via plot2d or plot3d? If the layout is already computed, the coordinates can be retrieved with get_pos() (and changed with set_pos()) sage: g=graphs.PathGraph(4) sage: g.get_pos() {0: [0, 0], 1: [1, 0], 2: [2, 0], 3: [3, 0]} Thanks, Jason --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Contour-plot of Weierstrass-p-Function
Marshall Hampton wrote: > I thought it would be cool to see a vector field plot with the real > and imaginary parts, but for some reason it doesn't work. Anyone know > why not? > > i=CDF.0 > tau=i > Om=pari([1,tau]) > var('x,y') > def g(a,b): > q = CDF(Om.ellwp(a+b*i)) > return (float(q.real()),float(q.imag())) > plot_vector_field(g(x,y), (.1,.9), (.1,.9)) plot_vector_field takes two functions currently. I don't see any reason it shouldn't be extended to take one function that returned two outputs, though. For now, at the cost of doing twice the computations, you could do something like: plot_vector_field((g_real(x,y), g_imag(x,y)), ...) where g_real and g_imag return the real and imaginary parts of g(x,y) Jason --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Plotting x^x
On May 16, 2:44 am, Dan Pillone <[EMAIL PROTECTED]> wrote: > > Is there a way to plot x^x correctly? A lovely article by Mark Meyerson entitled "The x^x Spindle" appeared in Mathematics Magazine back in June of 96. The article shows how to interpret the graph of x^x in 3-space, using the complex values of x^x. This may be plotted in sage as follows: def f(x,k): if x != 0: z = exp(x*(maxima.log(x) + 2*I*pi*k)) return [x, real(z), imag(z)] else: return [0, 1, 0] dx = 0.02 pic = line([[0,1,0],[0,1,0]]); for k in range(-3,4): points = [f(x*dx,k) for x in range(-4/dx,2/dx)] pic = pic + line(points) pic.show(frame_aspect_ratio=[2,1,1], figsize=8) The above commands take *way* too long, presumably due to the repeated calls to maxima's complex log function. Sage's log function doesn't work. I was able to perform the loop in maxima, but I was unable to get the result back into sage for plotting. The result is quite nice, though. There are countably many different threads, corresponding to the different branches of the complex log; they all spiral about the x-axis. You can see the graph here: https://www.sagenb.org/home/pub/1830/ The published notebook also shows a plot of x^x for x>0 together with points of the form (-p/q)^(-p/q) for odd q. These points all lie where one of the threads pierces the x-re(z) plane. Mark --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] getting the coordinates of the vertices of a drawn graph
Hello, is there a way to get the the coordinates of the points where the vertices of a graph would be placed if drawn via plot2d or plot3d? Nikos --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Drawing graphs with color coded edge labels
Hi, sorry for the late reply -- it's final's week. "William Stein" <[EMAIL PROTECTED]> writes: > On Sat, May 17, 2008 at 2:26 PM, Nikos Apostolakis <[EMAIL PROTECTED]> wrote: >> >> And a more general question. I generated this graph as follows: I have >> a group G with two generators acting on a finite set X. I use GAP to get >> the orbits of each generator and then I write a smal script to produce >> a SAGE DiGraph from these data: vertices correspond to elements of X and >> edges correspond to the generators of G. Is there a more >> "straightforward" way to do this in SAGE, I mean starting from a group >> action to get a digraph? > > I don't think there is. Improving Sage so that there *is* a straightforward > way to do this would be a great contribution for somebody to make to > Sage! > I guess one would need to start by implementing group actions in Sage, at the moment they are not implementedl, right? Nikos --~--~-~--~~~---~--~~ 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, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---