[sage-support] Re: polynomial evaluation
On 3/7/07, Kyle Schalm [EMAIL PROTECTED] wrote: On 3/7/07, Kyle Schalm [EMAIL PROTECTED] wrote: . the question is: how do i evaluate w while leaving z untouched? (i actually want to do this when R1 is a multivariable ring, but i imagine it works the same way.) Can't you just work with all the variables together, like: sage: P.z,w=QQ['z','w'] sage: P _2 = Polynomial Ring in z, w over Rational Field sage: f=z*w sage: f(z,2) _4 = 2*z i suppose i could if necessary. it's not ideal for at least two reasons i can think of: 1. if i want to evaluate just z (the most common case), then i have to write f(z,_,_,_,...). 2. separating the other variables into a base ring causes the polynomial to group terms by powers of z, which i also like. I agree that it should be allowed to evaluate in the way you want. If, not, you can always make a little function to evaluate (if there is no built-in way). sage: R1.w = QQ['w'] sage: R2.z = R1['z'] sage: f = z*w sage: def my_eval(f,a): ...: coef=f.coeffs() ...: res=0 ...: for i in range(len(coef)): ...: res+=coef[i](a)*z^i ...: return res ...: sage: f = z*w sage: my_eval(f,2) _5 = 2*z sage: g=(w+1)+w^2*z+3*z^3 sage: my_eval(g,2) _7 = 3*z^3 + 4*z + 3 hmm, this looks useful and i think that is what i will do. much thanks. The above code is a good idea, but there would be efficiency issues. It would be better to do this (see the ev function below). sage: R1.w = QQ['w'] sage: R2.z = R1['z'] sage: f = w*z + (1-w)*z^3 + 3 sage: def ev(f, a): ...return f.parent()([c(a) for c in f.list()]) sage: ev(f, 3) (-2)*z^3 + 3*z + 3 That said, I would love to add a function that basically does the above to SAGE, but it's unclear what the notation would even be. One idea is this: sage: f(w=3) would evaluate by setting w to 3. It would do this by: (1) check if w is an indeterminate of the parent of f; if so return f(3). (2) if the parent of f is not a poly ring, return f itself. (3) If not, return f.parent()([c(w=a) for c in f.list()]) This would recursively do (1)-(2) for each coefficient of f. This would work for very very complicated expressions in great generality and hence would probably be quite useful. This is also exactly the sort of thing Bobby has already implemented for his symbolic calculus package. So -- does anybody want to volunteer to implement the above? :-) -- William Stein Implement it and send me a patch --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: polynomial evaluation
On 3/8/07, Kyle Schalm [EMAIL PROTECTED] wrote: That said, I would love to add a function that basically does the above to SAGE, but it's unclear what the notation would even be. One idea is this: sage: f(w=3) in my actual situation, i have something like R1.w0,w1,w2,w3,w4,w5 = QQ['w'] R2.z = R1['z'] and i would like to compute the w's from some other variables, and then pass this list into the evaluator: w = expression that returns list of [w0,...,w5] f(z;w) # pseudo-notation instead of the cumbersome f(w0=w[0],w1=w[1],...) which only handles a constant number of variables anyway. i don't know what the notation should be, but it should somehow handle multiple variables. man, i really love using a software package where i can request features and have a response within hours. :-) Actually, you'll like it even more when you realize that the so called cumbersome notation f(w0=w[0],w1=w[1],...) isn't. In fact, if d is any dictionary, if you do f(**d), its as if you called f with the a bunch of key=value inputs. So with the notation I propose you can do arbitrarily complicated things like you suggest just by doing f(**some dict). So what you want should be easy to build on what propose. Thoughts? 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Fwd: SAGE usage
-- Forwarded message -- From: Karl Crisman [EMAIL PROTECTED] Date: Mar 8, 2007 11:32 AM Subject: RE: SAGE usage To: William Stein [EMAIL PROTECTED] Dear Prof. Stein, Thanks very much for your response. I appreciate the sentiments as well as interesting preview information, and look forward to trying to keep abreast of everything via the lists (if I can!). I won't waste further time now, except to say on three points that 1) I checked and do have 1 GB memory, though it is indeed PowerPC not Intel, but the Notebook definitely completely stalls with regularity; 2) No, Mac Grapher is not available online, but our campus is compact and it's easy for students to use the Mac labs for this; 3) I am apparently in a thread on the support list regarding the Python timeit module issue, which I think I've almost resolved on my own anyway. Good luck in the further development. Best, Karl-Dieter -- William Stein Associate Professor of Mathematics University of Washington --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: HTML in the notebook
Moreover, you can output arbitrary HTML as part of a normal SAGE command and have it appear in HTML in the output. Just wrap what you print in html and /html. E.g., {{{ print 'html' for i in range(10): print 'bfont color=red size=+4 %o /font/bbr'%i print '/html' /// html bfont color=red size=+4 0 /font/bbr bfont color=red size=+4 1 /font/bbr bfont color=red size=+4 2 /font/bbr bfont color=red size=+4 3 /font/bbr bfont color=red size=+4 4 /font/bbr bfont color=red size=+4 5 /font/bbr bfont color=red size=+4 6 /font/bbr bfont color=red size=+4 7 /font/bbr bfont color=red size=+4 10 /font/bbr bfont color=red size=+4 11 /font/bbr /html }}} On 3/9/07, David Joyner [EMAIL PROTECTED] wrote: HTML tables can be created in a cell. For example, paste the following into a cell: %html p table style=text-align: center; width: 100%; border=1 cellpadding=2 cellspacing=2 tbody tr td 1 /tdtd 2/td /tr tr td 3 /tdtd 1+2sup4/sup/td /tr /tbody /table However, if you put anything after the /table you'll get nothing. Try pasting this into a cell: %html table style=text-align: center; width: 100%; border=1 cellpadding=2 cellspacing=2 tbody tr td 1 /tdtd 2/td /tr tr td 3 /tdtd 4/td /tr /tbody /table hi = Hello World! I get nothing at all. On 3/9/07, Timothy Clemans [EMAIL PROTECTED] wrote: Hi, I created an interesting html table and colored it, using Python. I tried putting the code into SAGE, but I just could not seem to get it to work (just a bunch of \n's). http://tclemans.nonlogic.org/table.html def dt(s): string = html\n string += head\n string += titleFactor Table/title\n string += style\n string += table {margin: 0; padding: 0; border: 1px solid #ccc;}\n string += tr {margin: 0; padding: 0; border: 1px solid #ccc;}\n string += td {margin: 0; padding: 0; border: 1px solid #ccc; width: 20px; height; 20px;}\n string += #yes {background: red; margin: 0; padding: 0; width; 20px; height: 20px;}\n string += #no {background: blue; margin: 0; padding: 0; width; 20px; height: 20px;}\n string += /style\n string += body\n string += table\n for a in range(1,s+1): string += tr for b in range(1,s+1): if a%b == 0: string += 'td id=yes/td' else: string += 'td id=no/td' string += /tr\n string += /table\n/body\n/html\n return string -- William Stein Associate Professor of Mathematics University of Washington --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: notebook and octave amnesia
On 3/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a puzzling problem. I can use octave via sage from the terminal program, but when I invoke the notebook, it denies all knowledge of octave and suggests that I install it. This started with sage 2.0 and has persisted since then. The problem occurs under MacOS 10.4.8 on both and iBook G4 and an Intel Mac Mini. Please, does anyone have a solution or other soothing words of wisdom? Like you, I don't know what causes this problem. Unfortunately, I've never seen it before either. In any case, a possible solution would be to put a little script like this in SAGE_ROOT/local/bin/ - #!/bin/sh /the/actual/path/to/your/octave/program/octave $* - Call it octave and do chmod +x octave to make it executable. Let me know what happens. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: [SAGE_(Math)] Can't Download Sage
On 3/17/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I can't download SAGE (for neither Windows nor Linux)...firefox responds with message: The connection has timed out The server at sage.math.washington.edu is taking too long to respond. sage.math has crashed. Please try http://www.sagemath.org/ instead. I'll presume it's a temporary thing; I shall try it again later on, maybe. Otherwise, do your thing to find out what's goin' on. DPD. -- William Stein Associate Professor of Mathematics University of Washington --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Fwd: Modular Down
On 3/20/07, Arthur Gaer [EMAIL PROTECTED] wrote: You're probably well aware of it, but U. Wash's version of Modular currently appears to be down (or at least unreachable). We have downtime for several days due to server room rewiring, and there's not much I can do about it... except make a mirror and put it in my living room... which I've done. Try doing (in bash): export SAGE_SERVER=www.sagemath.org sage -upgrade -- William Stein Associate Professor of Mathematics University of Washington --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Vandiver´s conjecture
On Tuesday 20 March 2007 4:11 am, DanK wrote: Is there a possiibility to not gain this error? Sometimes when I made an Output the error Output truncated occured, is it possible to say sage, to show the complete Output? Click on the left side of the error and you'll see the rest of it (as it says right in the error message). Is there are possibility to say sage, when there a special event occurs (here: the prime input is regular) to stop the computing s and say something like: The other computings are not necessary, because the pime is regular and Vandiver´s conjecture holds for it? The try: stuff except ...: other stuff construction in Python can be used to implement what you want. You can catch any error. You can find a lot in the Python documentation or Python books about exception handling. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Vandiver´s conjecture
On Tuesday 20 March 2007 4:29 am, DanK wrote: One more question: Is there a command to get the total time for all computings in one notebook sheet(?)? I know the command time for one cell of sage. The command cputime() returns the total CPU time used in that notebook sheet. The comand walltime() returns the total time since you started up that notebook sheet, i.e., how much time actually relapsed on your wall clock. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Setting-up a world-accessible notebook
On 3/21/07, Nikos Apostolakis [EMAIL PROTECTED] wrote: Following the instructions on the reference manual I tried to set up world-accessible notebook and I got the following mistake: sage: server_http1('test', address='my.web.address') server_http1 has *long* since been deprecated. Use notebook instead, e.g., notebook('test', address='my.web.address') And beware of security issues, i.e., make sure you run that from a very limited account or chroot jail. Creating directory /home/nea/test --- type 'exceptions.AttributeError'Traceback (most recent call last) /home/nea/ipython console in module() /usr/local/include/sage-2.3/local/lib/python2.5/site-packages/sage/server/server1/server1.py in server_http1(dir, port, address, ncols, nrows, viewer, workbook, max_tries) 713 HTML_Interface) 714 sa = httpd.socket.getsockname() -- 715 httpd.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) 716 except socket.error, msg: 717 print msg type 'exceptions.AttributeError': 'module' object has no attribute 'SO_REUSEPORT' TIA, Nikos -- William Stein Associate Professor of Mathematics University of Washington --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Can't download binaries?
On 3/21/07, sherifffruitfly [EMAIL PROTECTED] wrote: I stayed home from work today, and was flipping thru the channels, and happened across a UWTV broadcast of the prof-dude giving a talk about sage - so I thought I'd look into it. (jsmath too). I'm not able to connect to: http://sage.math.washington.edu/SAGEbin/microsoft_windows/ I get an http timeout. Is it just me? sage.math.washington.edu is down for the week due to the University of Washington math department doing maintenance on the server room. In the meantime, please use http://www.sagemath.org which is slower but is not at UW, so it works. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Can't download binaries?
On 3/21/07, sherifffruitfly [EMAIL PROTECTED] wrote: The link I posted, viz.: http://sage.math.washington.edu/SAGEbin/microsoft_windows/ was from http://www.sagemath.org/download.html, which was in turn from http://www.sagemath.org/ Maybe you intend that I do some URL cutpaste surgery - I'll give that a try. Please try http://www.sagemath.org/download.html again and press refresh in your browser. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Setting-up a world-accessible notebook
On 3/22/07, Nikos Apostolakis [EMAIL PROTECTED] wrote: On 3/21/07, Nikos Apostolakis [EMAIL PROTECTED] wrote: Thanks, that worked. Probably you are already aware of it but the documentation has not been updated. I got the idea from the reference manual in section 4.1.2.9 in the notes at the end of the section Module-level Functions. Thanks. I was actually unaware of this, but have fixed it for sage-2.4. And beware of security issues, i.e., make sure you run that from a very limited account or chroot jail. This is on a box acessible only on a LAN, used mainly for trying new stuff. I plan to run the notebook for a while so that I can show sage to my collegues and then I'll shut it down. Hopefully it won't be long until we have a secure version of the notebook. This requires changing the web server model to use twisted and ssl. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: is_prime for polynomials over ZZ
On Monday 26 March 2007 1:02 pm, David Harvey wrote: On Mar 26, 2007, at 3:57 PM, Timothy Clemans wrote: Apparently I was incorrectly defining x as an integer, however, I did not get an error the first I tried. incorrect way: x = PolynomialRing(ZZ) correct way: g.x = PolynomialRing(ZZ) The len method works now. Thanks. Be careful though: sage: R.x = PolynomialRing(ZZ) sage: f = 2*x^2 + 4*x + 8 sage: f.factor() 2 * (x^2 + 2*x + 4) sage: len(f.factor()) 2 Which might actually be what one wants, since indeed your poly f is not prime as an element of ZZ[x], since (2) is a prime ideal and (x^2+2*x+4) is divisible by other prime ideals. Note that there is an is_irreducible() method for polynomials, which correctly deals with the case of a multiple factor: sage: f = (x-1)^2 sage: f.is_irreducible() False sage: len(f.factor()) 1 -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Fwd: SAGE VMWare troubles
Hi David and Jack, I've posted a new SAGE-vmware image to http://www.sagemath.org/SAGEbin/vmware/ Please give it a try (at least 7 minutes after I send this email) and let me know what happens. Basically I got rid of SAGE0-1.vmdk, which has version 6, and left the version 4 disks, which should work fine (I got them from the vmware website). -- William On 3/26/07, David Joyner [EMAIL PROTECTED] wrote: Hi Jack: Sorry for the problems. I'm forwarding your message to sage-support since I don't use windows or vmware. - David -- Forwarded message -- From: Jack Schmidt [EMAIL PROTECTED] Date: Mar 26, 2007 9:57 AM Subject: SAGE VMWare troubles To: David Joyner [EMAIL PROTECTED], [EMAIL PROTECTED] Regarding Cygwin, SAGE will continue to support Cygwin. However, with SAGE-2.4 I'm also going to release a VMware virtual machine with SAGE preinstalled. Performance of SAGE under this machine is in many cases better than with Cygwin, *especially* when using code that isn't native to SAGE -- e.g., when using GAP via SAGE the experience is vastly better via the VMware machine, since forks and pseudo tty's work vastly better under Linux than in Windows. Also, the VMware machine will come with exactly the right optimized numerical libraries preinstalled, etc. I tried the new VMWare download for sage 2.4 on Windows XP. I downloaded the VMWare player and the two zip files from http://modular.math.washington.edu/sage/SAGEbin/vmware/sage-2.4/ extracted both, copied SAGE0-1.vmdk into sage-vmware-appliance\sage-vmware-appliance and double clicked on sage.vmx I got the error message: One or more of the disks used by this virtual machine was created by an unsupported version of vmware player. To power on or upgrade the virtual machine, either remove the unsupported disk(s) or use a version of VMWare player that supports this version of disks. Below is a list of the disks and their reported versions. Version 6 SAGE0-1.vmdk Version 4 Ubuntu.vmdk Version 4 swap.vmdk Removing these disks of course only changes the error message to: File not found: SAGE0-1.vmdk This file is required to power on this virtual machine. Use VMWare Workstation to repair this virtual machine. The readme.txt file for VMWare player says to use the help menu inside the product. Opening VMWare player gives a modal dialog box forcing me to find a valid vmware configuration file. There not being any, I cannot open the help menu. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: EulerianNumber command?
On 3/27/07, Kate Minola [EMAIL PROTECTED] wrote: Is there a SAGE command equivalent to the Magma command 'EulerianNumber'? Maybe. It's hard to tell. The Magma command says: (RngIntElt n, RngIntElt r) - RngIntElt The Eulerian number E(n, r) [n = 0]. but I don't know what that means, since there is no reference or anything. SAGE has a command euler_number, that takes only one input, has a bunch of examples, and a reference. If so, how would you expect a new SAGE user to find out about it? In other words, where should one search in the SAGE documentation? In sage-2.4, there is a new facility for full text search of all the documentation: 1. In the notebook (or command line, though in the notebook it's better) type: search_doc('eulerian') and press shift-enter. 2. You'll get one hit. Click on it. 3. You'll get a worksheet with examples of the euler_number command and relevant docs. Alternatively, type eul[tab] at the prompt and you'll see a few choices, and one is euler_number. It would be good if somebody could explain what Magma's eulernumber command is defined to actually do, and then somebody else could implement it in SAGE and send me a patch :-). -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: cross product
On 3/30/07, Marshall Hampton [EMAIL PROTECTED] wrote: I am not an expert on SAGE but I was curious about your question and tried to find an answer. I am curious about better ways to do this. Anyway, the first thing I found that works is to use maxima's vect package. For some reason it uses '~' as the cross-product operator. As an example: sage: maxima.load('vect') ?\/Users\/mh\/sage\ - 2\.1\.0\.1\/local\/share\/maxima\/5\.11\.0\/share \/vector\/vect\.mac sage: maxima('express([1,2,3]~[2,3,4])') [ - 1,2, - 1] At some point it would be nice to have a native SAGE way to do this and other differential form computations; given the developer's interest in modular forms this probably wouldn't be extremely difficult. You're right. I'll add an optimized native implementation in the very near future. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: upgrade problem
On 3/31/07, didier deshommes [EMAIL PROTECTED] wrote: Hi all. I just upgraded (by running sage -upgrade) and I am having the problem shown down below. Some things that I have tried include running sage with the command LD_LIBRARY_PATH=/home/bober/sage-2.3/local/lib/ SAGE_ROOT=/home/bober/sage-2.3/ ./sage Hi Jonathan, You should try erasing SAGE_ROOT/devel/sage-main and try reinstalling the sage-2.4.1.2 package. Did anyone have any luck upgrading their *branches* without this problem? The above works wonderfully if you only care about sage-main, but if you upgrade your branch and try to build it, you get back to square one. This is Very Annoying. /home/bober/sage-2.3/local/lib/python2.5/site-packages/sage/all.py in module() 43 del _l 44 except KeyError: --- 45 raise RuntimeError, To use the SAGE libraries, set the environment variable SAGE_ROOT to the SAGE build directory and LD_LIBRARY_PATH to $SAGE_ROOT/local/lib 46 47 Incidentally, if you ignore the KeyError by commenting the RunTimeError in all.py (around line 44), this works fine. Thanks for your debuging input. I've pushed out a simpler more direct test in this file, which people will now get if they do hg_sage.pull(). 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: quaternion algebras
On 3/31/07, AlexGhitza [EMAIL PROTECTED] wrote: I've been trying to work with quaternion algebras in SAGE, but with rather mixed results. I'm not sure whether this is due to incomplete implementation or just to the fact that I'm doing things the wrong way. It's undoubtedly due to an incomplete and half-way documented implementation. About 1.5 years ago, near the beginning of SAGE, David Kohel (fairly quickly) implemented most of what is in the current quaternion algebra SAGE package. Much has changed in SAGE since then, and I've done work to update the quaternion algebra package a little, as has David. But basically nobody has used it for anything nontrivial *at all* until perhaps a little at the Arizona Winter School a few weeks ago. So the package desparately needs to get used, have all the gaps in functionality exposed, and have them fixed. You are the person to do that. Go for it!! Then send me a patch. Personally, I very much want to implement my modular abelian variety Tamagawa number algorithm in SAGE, and part of this requires a good quaternion algebras package (in order to implement some variant of Pizer's algorithm). So I will be enthusiastic about any improvements to the quaternions package. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: install prob.
On 4/1/07, William Stewart wrote: I'm a Linux newbie but I haver just installed the most recent stable Debian release. I logged in as root, downloaded your Linux 32 distribution dated march 25th, decompressed, moved the decompressed folder from desktop/download into home, cd'd to the directory and ran the sage script. I received the following error messages. Perhaps you could advise where I went wrong? Thanks. Regards Bill Stewart [...] --- 54 from sage.rings.memory import pmem_malloc 55 pmem_malloc() 56 type 'exceptions.ImportError': libstdc++.so.5: cannot open shared object file: No such file or directory You have to install the libstdc++5 Debian package. As root in Debian, do apt-get install libstdc++5 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: somewhat secure notebook server
On 4/3/07, Timothy Clemans [EMAIL PROTECTED] wrote: sagenb.com and sagenb.org are public servers There should be enough security soon that they should be appropriate for your class soon. No -- these are not appropriate for a class, since they could easily go down for a number of reasons, and they aren't that robust. They are only meant for people to do some temporary testing sharing of SAGE worksheets -- but shouldn't be the main way a person makes SAGE available to a class. On 4/3/07, Marshall Hampton [EMAIL PROTECTED] wrote: I would like students in a class to have access to a sage notebook server. My current setup is: I've created the most locked-down user I can in OS X, and from that account (lets call it 'weakuser'), I started up a notebook with a username and password; the notebook files are located at something like /Users/weakuser/NotebookName. I was thinking of giving the username and password for the notebook to my students (these would be different from guest and its password). My question is: is there anything else I can easily do to make this secure? I use the server machine as a desktop a lot, but I back up my work every day. Is this setup reasonably secure? It is just as secure as giving out a guest login/password to your machine for logging into that account, i.e., it's back to the question of how secure OS X itself is against a local exploit, which is I guess a standard question. In fact, you may want to have a guest account for your students, to allow students with ssh to connect and use the command-line version of SAGE, which some might like. Regarding how you actually start the notebook server, I use this script (with the notebook line having no line break): [EMAIL PROTECTED]:~$ more notebook.py from sage.all import * notebook(port=8101, address=sage.math.washington.edu, jsmath=True, color='gmail', restart_on_crash=True, username=, password=, auto_restart=800) --- Then to actually start the server, I type sage notebook.py Note that auto_restart=800 line, which will completely restart the notebook server every 800 seconds -- this prevents people accidentally (or on purpose) running long-running calculations, which would slow down the machine for your use or other people's use, and helps defend against memory leaks. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Windows Vista
On 5/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I run Sage 2.4 on my office Windows XP machine as a VMWare appliance without problem. I would like to run it on my laptop Windows Vista machine. I can run the appliance and work with Sage through the command prompt but I can't run the notebook. During startup I get a The network bridge on device VMnet0 is temporarily down because the bridged Ethernet interface is down. The virtual machine may not be able to communicate with the host or with other machines on your network. message from the VMware player. Any idea what network/firewall/configuration settings I need to change to get the notebook to work? This seems like very much a VMware configuration question rather than a SAGE question. Unfortunately I don't have any ideas. You might try asking on the VMware forums. Please feel free to report back with what you find. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: 2.4.2 bug and patch
Kate, Thanks for the fix. I've included this in my main tree for sage-2.5. On 5/3/07, Kate Minola [EMAIL PROTECTED] wrote: For sage-2.4.2, Martin Albrecht reported that he does not see the error message that I see when I run sage -t devel/sage-main/sage/geometry/lattice_polytope.py What I see is [Errno 39] Directory not empty: '/home/kate/.sage//tmp/5852/' I have investigated and determined that the problem only occurs if the DOT_SAGE file is on a shared file system. I also do not get the error message when DOT_SAGE is on a local disk. I suspect this is why Martin did not see the same error message. The problem occurs in lattice_polytope.py when the following lines are executed: o = lattice_polytope.octahedron(3) lattice_polytope.all_cached_data([o.polar()]) quit The first two lines are from the example in all_cached_data(). The 'quit' comes from 'sage -t' Now the line 'lattice_polytope.all_cached_data([o.polar()])' is supposed to give a traceback; unfortunately it also leaves an open file descriptor. It is this open file descriptor to a file in DOT_SAGE/tmp that causes the problem when the sage 'quit' command is run on a shared file system. The shared file system notes that a process is reading from the file and so does not allow the file to be deleted. Unfortunately this is precisely what the sage 'quit' command tries to do (using shutil.rmtree) to DOT_SAGE/tmp. A fix is to have the sage 'quit' command close all open file descriptors before attempting to delete the directory DOT_SAGE/tmp. This can be done by adding to spkg/standard/sage-2.4.2/sage/all.py in the routine quit_sage() right before the lines from sage.misc.misc import delete_tmpfiles delete_tmpfiles() add the following lines # close all open file descriptors import resource # Resource usage information. maxfd = resource.getrlimit(resource.RLIMIT_NOFILE)[1] print maxfd; if (maxfd == resource.RLIM_INFINITY): maxfd = MAXFD # Iterate through and close all file descriptors. for fd in range(0, maxfd): try: os.close(fd) except OSError: # ERROR, fd wasn't open to begin with (ignored) pass -- Kate Minola University of Maryland, College Park -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: feature questions
On Monday 07 May 2007 10:11 am, Brian Harris wrote: Thanks for the scatter plot pointers. For question 2, imagine something like: f(x) = 5 * SUM(1i10, x^i) Probably not standard sum notation, but I hope it's clear. Now I want to use SAGE to compute f'(x). This doesn't help you today, but in SAGE-2.5 (which will be much more aimed at Calculus use), which will be released this week, you'll be able to do this: sage: f = 5*sum(x^i for i in range(1,10)); f 5*(x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x) sage: f.derivative() 5*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1) Actually, the above would also work in sage-2.4, but would have slightly different output. Maybe you could send some more complicated examples along these lines that you're interested in. They are useful to us, since we can add them as examples in the reference manual and/or tutorial. william On May 6, 9:04 pm, Marshall Hampton [EMAIL PROTECTED] wrote: I'm not completely sure what you mean for your question 2 - can you give an example? For your first question, if you have a tuple of 2D data called 'data', then in the notebook you can do show(point(data)) and you get a scatterplot. In the reference manual under 2D-plotting there is more information on graphics primitives, such as adding colors (http://modular.math.washington.edu/sage/doc/html/ref/module- sage.plot.plot.html). There is also a list_plot command, so you can do show(list_plot(data)) to a list of data points; this has a 'plotjoined' option. Hopefully that helps. I am not a SAGE guru, so there may be other nice options as well. -M.Hampton On May 6, 2:49 pm, Brian [EMAIL PROTECTED] wrote: 1. How do you do scatter plots in SAGE, without using an interface to underlying commercial software like MATLAB? 2. Can maxima or another tool compute [partial] derivatives or integrals containing arithmetic sums or products? -- William Stein Associate Professor of Mathematics University of Washington --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: feature questions
On 5/7/07, Brian Harris [EMAIL PROTECTED] wrote: Nice, I didn't know about .derivative(). For calculus presented in the tutorial (http://modular.math.washington.edu/sage/doc/html/tut/ node22.html) you do everything in Maxima calls/functions. An explanation in the tutorial (and as a google group posting as I have an assignment due tomorrow!) of the options and trade-offs for performing calculus computations would be helpful. Almost all the explicit calls to maxima in the tutorial will go away with sage-2.5. Everything will be done via working directly in SAGE -- maxima will be used in some cases behind the scenes. I'm doing density estimation right now for a statistics/probability class which involves maximizing log-likelihood formulas. I would be happy to provide material for a short tutorial on how to do this as I learn it myself. Perhaps first we could show how to estimate the That would be good. single parameter of an exponential density, then showing how to estimate the 2 parameters of a normal density using partial derivatives, and finally show how to estimate the 2 parameters of a logistic density using gradient ascent (we were told that maximizing the system of equations resulting from taking the partial derivatives of the logistic log-likelihood formula is a problem that cannot be solved analytically, so we're doing this iterative estimation method). What do you think, and by the way, do you have a solve() method for finding function maxima? Maxima itself has a solve command, and in sage-2.5 there will be an algebraic solve command. Again a clear example of what you're asking for would be helpful. Brian On May 7, 10:09 am, William Stein [EMAIL PROTECTED] wrote: On Monday 07 May 2007 10:11 am, Brian Harris wrote: Thanks for the scatter plot pointers. For question 2, imagine something like: f(x) = 5 * SUM(1i10, x^i) Probably not standard sum notation, but I hope it's clear. Now I want to use SAGE to compute f'(x). This doesn't help you today, but in SAGE-2.5 (which will be much more aimed at Calculus use), which will be released this week, you'll be able to do this: sage: f = 5*sum(x^i for i in range(1,10)); f 5*(x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x) sage: f.derivative() 5*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1) Actually, the above would also work in sage-2.4, but would have slightly different output. Maybe you could send some more complicated examples along these lines that you're interested in. They are useful to us, since we can add them as examples in the reference manual and/or tutorial. william On May 6, 9:04 pm, Marshall Hampton [EMAIL PROTECTED] wrote: I'm not completely sure what you mean for your question 2 - can you give an example? For your first question, if you have a tuple of 2D data called 'data', then in the notebook you can do show(point(data)) and you get a scatterplot. In the reference manual under 2D-plotting there is more information on graphics primitives, such as adding colors (http://modular.math.washington.edu/sage/doc/html/ref/module- sage.plot.plot.html). There is also a list_plot command, so you can do show(list_plot(data)) to a list of data points; this has a 'plotjoined' option. Hopefully that helps. I am not a SAGE guru, so there may be other nice options as well. -M.Hampton On May 6, 2:49 pm, Brian [EMAIL PROTECTED] wrote: 1. How do you do scatter plots in SAGE, without using an interface to underlying commercial software like MATLAB? 2. Can maxima or another tool compute [partial] derivatives or integrals containing arithmetic sums or products? -- William Stein Associate Professor of Mathematics University of Washington -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: feature questions
On 5/7/07, Brian Caitlin Harris [EMAIL PROTECTED] wrote: I'm stuck again. Are rings something that will be more transparent in future versions, or must I learn them :) They will be much more transparent -- you won't have to learn about them. Basically what you're trying to do below is not supported in sage-2.4.2, except via maxima. In sage-2.5 it is very well supported. What operating system are you using? -- William sage: x = polygen(RR,'x') sage: f = exp(x) type 'exceptions.TypeError': cannot coerce nonconstant polynomial to float Brian On 5/7/07, William Stein [EMAIL PROTECTED] wrote: On 5/7/07, Brian Caitlin Harris [EMAIL PROTECTED] wrote: I was just asking about the recommended way to solve some general problems. You've answered my question by saying that maxima will be more transparent in the future. By the way, it's unintuitive that this should give an error in SAGE: f =x - 3.3 type 'exceptions.TypeError': unsupported operand parent(s) for '-': 'Univariate Polynomial Ring in x over Rational Field' and 'Real Field with 53 bits of precision' What's the workaround? (a) wait for sage-2.5 in which you get: sage: f = x - 3.3 sage: f x - 3.30 (b) Today: sage: x = polygen(RR,'x') sage: f = x - 3.3 sage: f 1.00*x - 3.30 -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: error when loading
On 5/8/07, Brian Harris [EMAIL PROTECTED] wrote: This happens when loading any file, ideas on why? [EMAIL PROTECTED]:~/Desktop/sage-2.5-linux_32bit-debian-i686-Linux $ ./sage -- | SAGE Version 2.5, Release Date: 2007-05-08 | | Type notebook() for the GUI, and license() for information.| -- sage: load examples/calculus/newton_raphson.sage --- type 'exceptions.AttributeError'Traceback (most recent call last) /home/brharris/Desktop/sage-2.5-linux_32bit-debian-i686-Linux/ipython console in module() /home/brharris/Desktop/sage-2.5-linux_32bit-debian-i686-Linux/local/ lib/python2.5/site-packages/IPython/iplib.py in ipmagic(self, arg_s) 955 else: 956 magic_args = self.var_expand(magic_args,1) -- 957 return fn(magic_args) 958 959 def ipalias(self,arg_s): /home/brharris/Desktop/sage-2.5-linux_32bit-debian-i686-Linux/local/ lib/python2.5/site-packages/IPython/Magic.py in magic_run(self, parameter_s, runner) 1674 if restore_main: 1675 sys.modules['__main__'] = restore_main - 1676 self.shell.reloadhist() 1677 1678 return stats /home/brharris/Desktop/sage-2.5-linux_32bit-debian-i686-Linux/local/ lib/python2.5/site-packages/IPython/iplib.py in reloadhist(self) 1255 1256 if self.has_readline: - 1257 self.readline.clear_history() 1258 self.readline.read_history_file(self.shell.histfile) 1259 type 'exceptions.AttributeError': 'module' object has no attribute 'clear_history' Hmm. I did fix this for sage-2.5 (and you were right -- the break involved upgrading ipython). In my sage-2.5 it works fine: [EMAIL PROTECTED]:~/sage-bdist$ ./sage -- | SAGE Version 2.5, Release Date: 2007-05-08 | | Type notebook() for the GUI, and license() for information.| -- sage: load example.sage This is a simple SAGE example script. 9765625 5 * 401 [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] [(0 : 0 : 1)] 37 The following should be true: True What happens if you put quotes around the file name in your case? Maybe that would be a reasonable work-around. That said, please type version() from the SAGE prompt to confirm that your sage library code is at version 2.5.If you upgraded maybe there was a failure. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: 2.5 variables
On 5/8/07, Brian Harris [EMAIL PROTECTED] wrote: I don't understand this behavior: sage: (x^2).diff() 2*x sage: (xx^2).diff() ... type 'exceptions.NameError': name 'xx' is not defined Is the idea that the variable names [a-z] have been predefined for convenience, but all others need to be explicitly defined before being used? Yes. To define xx you must write var('xx') Congratulations on the release, by the way! Thanks. And thanks for the bug reports. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: feature questions
On 5/8/07, Brian Harris [EMAIL PROTECTED] wrote: Do you have plans to ever support this? sum(x^i for i in range(1,n)).diff(x) Do you mean working symbolic with formal sums? If so, yes, we definitely do plan to support this. Please feel free to send a list of example type problems that illustrate the functionality you would like to have. William On May 7, 10:09 am, William Stein [EMAIL PROTECTED] wrote: On Monday 07 May 2007 10:11 am, Brian Harris wrote: Thanks for the scatter plot pointers. For question 2, imagine something like: f(x) = 5 *SUM(1i10, x^i) Probably not standardsumnotation, but I hope it's clear. Now I want to use SAGE to compute f'(x). This doesn't help you today, but in SAGE-2.5 (which will be much more aimed at Calculus use), which will be released this week, you'll be able to do this: sage: f = 5*sum(x^i for i in range(1,10)); f 5*(x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x) sage: f.derivative() 5*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1) Actually, the above would also work in sage-2.4, but would have slightly different output. Maybe you could send some more complicated examples along these lines that you're interested in. They are useful to us, since we can add them as examples in the reference manual and/or tutorial. william On May 6, 9:04 pm, Marshall Hampton [EMAIL PROTECTED] wrote: I'm not completely sure what you mean for your question 2 - can you give an example? For your first question, if you have a tuple of 2D data called 'data', then in the notebook you can do show(point(data)) and you get a scatterplot. In the reference manual under 2D-plotting there is more information on graphics primitives, such as adding colors (http://modular.math.washington.edu/sage/doc/html/ref/module- sage.plot.plot.html). There is also a list_plot command, so you can do show(list_plot(data)) to a list of data points; this has a 'plotjoined' option. Hopefully that helps. I am not a SAGE guru, so there may be other nice options as well. -M.Hampton On May 6, 2:49 pm, Brian [EMAIL PROTECTED] wrote: 1. How do you do scatter plots in SAGE, without using an interface to underlying commercial software like MATLAB? 2. Can maxima or another tool compute [partial] derivatives or integrals containing arithmetic sums or products? -- William Stein Associate Professor of Mathematics University of Washington -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Reporting ImportError
(/Applications/sage-2.4- PowerMacintosh-Darwin/local/lib/python2.5/site-packages/sage/libs/ linbox/linbox.so, 2): Symbol not found: _linbox_integer_dense_smithform Referenced from: /Applications/sage-2.4-PowerMacintosh-Darwin/local/ lib/python2.5/site-packages/sage/libs/linbox/linbox.so Expected in: /Applications/sage-2.4-PowerMacintosh-Darwin/local/lib// liblinboxwrap.0.dylib -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: sage-2.5 make distclean
On 5/9/07, Kate Minola [EMAIL PROTECTED] wrote: For sage-2.5, when I do 'make distclean' the following files and directories are in the top level sage directory: ipython matplotlibrc tmp They are NOT in the source tarball. Thanks! I've fixed this for SAGE-2.5.1. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Comments on Sage 2.5
On 5/11/07, dgalant l wrote: PS Has anyone thought about the possibility of making the sage reference manual (1100+ pages) available as a published document? It's actually about 2000 page now. I don't think anybody has considered publishing it with a publisher. What are your thoughts on the matter? On 5/11/07, dgalant wrote: I certainly cannot print such a document, even with two pages printed /actual page, and I am of such an age that books are better for reference than a pdf document. Maybe you could print relevant sections or page ranges, instead of printing the whole thing? A good index is worth a great many searches. Have you found the index of the reference manual useful? Also, there is a search_doc command in SAGE, which might be useful for you, as it does a full text search of all the HTML docs. It's a little slow still, e.g., a search could take a second, but faster than not being able to find something at all. Even worse, an HTML document of such a size is usually broken into many, many pieces and is even less searchable. I'd certainly buy one, but what do I know about your community of users? Nobody has made such a request until you, so I guess it isn't a big requirement yet. I'm sure that could change. William -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: notebook display error
On 5/17/07, Marshall Hampton [EMAIL PROTECTED] wrote: I have a more reproducible version of this bug. If you execute the following three commands in seperate cells, you should see the sort of problem I am having: show(line(((0,0),(1,1 show(line(((0,0),(1,1))),figsize=[1280,800]) Gees -- that is crazy huge. A reasonable figsize would be something like [8,5]. I think the units of figsize are something like inches... You probably seriously exceeded the capacity of SAGE/matplotlib or your browser by making such a large figure. show(line(((0,0),(1,1 The middle command generates an error - I was originally trying to resize a more complicated figure and this syntax must be wrong. But then the show command won't work at all. Unlike my previous problems, however, stopping and restarting sage will fix this, as will creating a new worksheet. I sense they related somehow though. M.Hampton On May 16, 8:42 pm, Marshall Hampton [EMAIL PROTECTED] wrote: I copied/pasted it from the notebook, so its not a typo. I opened it by navigating manually through the filesystem, but the address is correct (with the leading /). I haven't had a problem of this type before, and I have done some very similar things. The trouble began when I was writing some fairly buggy code working on a PHCpack parser. The next time I have access to that machine (probably Friday) I will start a completely new notebook, since perhaps my messed up worksheet somehow 'infected' the overall notebook (I did start new worksheets after the problems started). I did quit out of sage and restart, but with the same notebook command from my history. Marshall On May 16, 3:49 pm, Justin C. Walker [EMAIL PROTECTED] wrote: On May 16, 2007, at 1:35 PM, Marshall Hampton wrote: I am having trouble getting the show() command to work in the notebook. After the following commands: sage: a = [[[0.0, -1.0], [0.0, 1.0]], [[0.0, 1.0], [0.0, -1.0]]] sage: pts3=[point((pt[0],pt[1])) for w1 in a for pt in w1] sage: show(plot(pts3)) nothing happens. On the terminal display, it acts like the PNG file is not there: file not found [Errno 2] No such file or directory: 'Users/guest/ MySAGE/MySAGE/worksheets/test/cells/1/sage0.png' nomad66-243.d.umn.edu - - [16/May/2007 15:27:33] GET /Users/guest/ MySAGE/MySAGE/worksheets/test/cells/1/sage0.png?1 HTTP/1.1 404 - It's odd that the two lines have slightly different filenames (no leading / in the first one). Did you type this or copy/paste? It's a silly question, but it helps to rule out some things (and you deserve an award of some type if you did type it in :-}) Could be quirk of the logging function, or it could be an explanation... The above works fine on my Mac (which doesn't help, of course). No spaces in the name, it appears. Did you try opening the file by copy/pasting the name from the log to the terminal? Justin -- Justin C. Walker, Curmudgeon-at-Large () The ASCII Ribbon Campaign /\ Help Cure HTML Email -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: wish.list
On 5/18/07, Sara Billey wrote: As I was getting acquainted with SAGE this morning I made some notes on my wish list and issues that came up. The last one is probably most useful to you. I thought I would pass them all along just in case they are useful. I don't mean to be demanding answers about free software. Thanks! Thanks again for the demo! I am very impressed with all the work that you and the SAGE team have done. -Sara How do I get a direct connection to my xemacs file for editing? I see there are emacs like keybindings available. That will be great when I get it going. (I wish I could just click here for that.) I'm not quite sure exactly what you're asking for. Could you clarify? One possibly useful thing you could do would be to edit the relevant file in xemacs under windows, then paste it into the notebook edit mode. Maybe I can come by and ask you for clarification. Perhaps a better setup would be a file upload / update button -- then you would edit the text version of the notebook under xemacs in windows, and at the click of a button have it automatically get uploaded and displayed in the notebook browser. This doesn't exist yet, but would likely be very easy to implement. I would like a direct way to turn my latex document into a sage document. In any equation mode, I want to be able to insert extra text which is commented out from the point of view of latex but which turns into an active equation in sage. I very much want this too, and think I can do it via a combination of latex2html and stuff already in SAGE. What format would you want for the insert extra text? For example, some math and words \sage{ a = matrix(2,2, [1,2,3,4]) } and in latex \sage would be defined to do nothing, but when parsed by latex2html it would be output in a way that could be interpreted as input to SAGE (i.e., an input cell in the notebook). It would be nice if all the coxeter group stuff from gap was more readily apparent in sage. (Hmm, Brant Jones just told me this has been removed in the most recent version of GAP.) Why was it removed? I would like to get more specific information on making a matrix when I type search_doc(matrix) Oh, actually just not using the help function properly yet. The comman search_doc(matrix) was clearly not meant to be used by the novice. Basically you should type matrix?. search_doc was written by me in 30 minutes to be better than nothing. One of the SAGE developers (alex clemesha) has a demo of something much much better for browsing the help. Also the index in the reference manual on the web page is somewhat useful. Learning to use help: =? returns No object currectly defined For any object x do x.[tab] to get all functions on x. If foo is a function do foo? or x.foo? for help and x.foo?? for the source code. 2.3.2 Multivariate Polynomials (doc_browser_32) Sometimes I don't know in advance how many variables I will want. Do I have to declare the number of variables? Looks like I could do R = MPolynomialRing(R,30,z) Is there a way to get (z[1]+z[2])^2 to exand this just assuming we have commuting variables? There is no way to have the number of variables grow at present -- you just have to make a ring with lots of variables. However, if you do R = MPolynomialRing(R,30,z) z = R.gens() Then z[0], z[1], etc. are the generators. When I find a term I don't know in the SAGE documentation, I would like to be able to look it up easily using wikipedia or world of math. I see that highlighting the term and right clicking in the highlight box gives me an option to search google. However, I can't find the results of my search. That's a great idea that nobody has ever suggested to me before -- thanks. I don't know where the search is vanishing to though... you'll have to show me. Very interesting idea. Being able to hide a computation or output is very handy. But, when I am just doing simple things, I like there to be output everytime. Do I need to say show each time or can I toggle some parameter to show everything unless I request to hide it? The default is *always* to show everything. There are also buttons in the upper right to hide all and show all output. Ok, I tried to challenge SAGE a bit by doing v = [n^2 for n in range(0,10^8)] I got
[sage-support] Re: notebook display error
On 5/18/07, Marshall Hampton [EMAIL PROTECTED] wrote: Thanks. Several of my .sws files gave me errors when I tried to upload them - is there any compatability requirements for that - e.g. having the same version of sage or sage directory? Its also possible No -- all versions should work on everything and be cross platform. If it's OK, could you send me one that fails somehow, so I could look into it. We'll likely soon change the format of sws files to be a plain text file and a directory of graphics as a tarball -- then sws's will be very transparent indeed. that I saved those worksheets on a Windows machine and then moved them over to my OS X laptop. One suggestion I have arising from my problems is that the documentation for the show command be improved. It is a very important function for most users. Agreed -- the documentation for show now is terrible. It doesn't even mention that it can be used to show the typeset version of an object! This is now ticket #370: http://www.sagemath.org:9002/sage_trac/ticket/370 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: sage-vmware : make error installing lie-2.2.2.p1
Lie requires curses to build, and evidently that isn't installed into sage-vmware. Login via manage (at the login prompt) and type sudo apt-get install libncurses5-dev then sudo sage -i lie-2.2.2.p1 and it will work. In the future SAGE-vmware will include libncurses. To use lie, start the SAGE command line or login and type sage: !lie since nobody hasn't written a SAGE interface to lie yet. William On 5/21/07, swr [EMAIL PROTECTED] wrote: sage-vmware-2.5.0.2 upgrade() OK 'SAGE Version 2.5.2, Release Date: 2007-05-20' Make error installing optional lie-2.2.2.p1 cannot find -lcurses install_package('lie-2.2.2.p1') [...] gcc -c -Dpreprocessor -ansi -I/usr/local/sage/local/lie -I/usr/local/sage/local/lie/box -O getl.c gcc -ansi -c date.c gcc -o Lie.exe lexer.o parser.o non-ANSI.o bigint.o binmat.o creatop.o gettype.o getvalue.o init.o learn.o main.o mem.o node.o onoff.o output.o poly.o sym.o print.o getl.o date.o static/*.o box/*.o -lreadline -lcurses /usr/bin/ld: cannot find -lcurses collect2: ld returned 1 exit status make[1]: *** [Lie.exe] Error 1 make[1]: Leaving directory `/usr/local/sage/local/lie' make: *** [all] Error 2 Error building Lie. Command exited with non-zero status 1 7.07user 2.78system 0:12.57elapsed 78%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (71major+138785minor)pagefaults 0swaps sage: An error occured while installing lie-2.2.2.p1 Please email William Stein [EMAIL PROTECTED] -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: symbol number radian degree
On 5/21/07, Bobby Moretti [EMAIL PROTECTED] wrote: In the past, we've favored polluting the class namespace over lack of clarity. For example, simplify_trig = trig_simplify, simplify_rational = rational_simplify, etc. Would it be so bad to have, something like: def numerical_approximation(self, prec): try: field = RealField(prec) except TypeError: field = prec return self._mpfr_(field) in symbolic expression objects? Actually I like that since it's so clear. Be careful to allow the answer to be in ComplexField if there is no coercion to RealField. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Maxima (hence calculus) issues
On 5/23/07, kcrisman [EMAIL PROTECTED] wrote: Please start SAGE, type sage: !maxima then send the output. sage: !maxima dyld: Library not loaded: /usr/local/lib/libintl.3.dylib Referenced from: /Applications/sage-2.5.3-powerpc-osx-PowerMacintosh- Darwin/local/lib/maxima/5.12.0/binary-clisp/lisp.run Reason: image not found Now I understand what is happening. I don't own a PPC OS X machine, so I have to build everything on an account on some random very non-minimally configured PPC machine. Evidently it now has some library -- libintl.3.dylib, which the Maxima build is picking up. Your options include: (1) Try putting the libintl files from http://sage.math.washington.edu/home/was/tmp/libintl/ in /usr/local/lib/ on computer or in SAGE_ROOT/local/lib/, and let me know what happens, or (2) Wait until I either get a PPC OS X machine (which is something I have no big desire to do), or (3) Build SAGE from source yourself. Just get xcode, extract the SAGE tarball, type make, and wait. I get the same message when I try to run the Sage maxima directly from the shell. This makes a little sense, since the contents of my /usr/local/lib directory is libhistory.5.0.dyliblibhistory.alynx libhistory.5.dylib libhistory.dyliblynx.cfg which doesn't include this file. But then the question arises, why did Maxima (and its functions) work before (as well as, where do I get libintl.3.dylib)? I suspect that there is something related in the following issue. Typing divisors?? works fine, typing plot? works fine, but when I try plot?? I get a long error message (relevant parts below). Then when I retry divisors??, I get a very similar error message. In both cases it seems like there is a call to a 'NoneType' object when trying to call a definition, and it propogates somehow. Could I be missing a library or other file for this too, which then makes an object go missing? I have never been able to run plot?? properly, in any version of Sage, unfortunately, though this error is new. I'll also mention that I get a similar library missing message, looking for a file in /Users/was/, which I definitely will never have, when I try to run gp directly from the shell: dyld: Library not loaded: /Users/was/sage-2.5.rc2/local/lib/ libreadline.5.2.dylib Referenced from: /Applications/sage-2.5.3-powerpc-osx-PowerMacintosh- Darwin/local/bin/gp Reason: image not found Trace/BPT trap Thanks and I hope this helps in development, as well as (potential) use in calculus this fall. Error getting source: arg is not a module, class, method, function, traceback, frame, or code object --- type 'exceptions.TypeError' Traceback (most recent call last) and ending with 483 else: -- 484 out.write(header('Call def:\t') +self.format(call_def)) 485 call_ds = getdoc(obj.__call__) 486 if call_ds: type 'exceptions.TypeError': cannot concatenate 'str' and 'NoneType' objects] divisors?? [same type of error message 411 if defln: -- 412 out.write(header('Definition:\t') +self.format(defln)) 413 414 # Docstrings only in detail 0 mode, since source contains them (we type 'exceptions.TypeError': cannot concatenate 'str' and 'NoneType' objects] -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: notebook display error
On 5/24/07, Marshall Hampton [EMAIL PROTECTED] wrote: Help! I was hoping to collaborate with someone using SAGE this week via a notebook, and I can't unless I get this fixed. Because I was getting errors as described above, where the leading / was missing on the path, I used a double // in my path for the notebook, i.e. a command starting out as: notebook('//Users/mh/test', address = '131. etc. This gave me no errors, but the graphics still don't display! I don't get it. I am now able to replicate this bug using the notebook you posted recently. This will get fixed for SAGE-2.5.4. However, as a temporary workaround, do the following: (1) start SAGE (2) cd to the directory that contains your notebook (3) Type notebook('MySAGE3') For example, I put your MySAGE3 on my Desktop. Then: sage: cd /Users/was/Desktop/ /Users/was/Desktop sage: notebook('MySAGE3',username='was',password='was') ... now it works ... --- Many thanks for finding this bug and persistently reporting it. It is users like you that really help to improve the quality of SAGE. Thanks! -- William M. Hampton On May 23, 11:07 am, Marshall Hampton [EMAIL PROTECTED] wrote: Stupid question: How do you directly load a .sobj file? This display problem seems to have actually gotten worse; now when I start up a brand-new notebook the problem appears right away. Upgrading to 2.5.3 didn't seem to help. In case it helps at all, I have created a record of my entire notebook directory at: http://www.d.umn.edu/~mhampton/MySAGE3.zip When I execute the only command: show(line(((1,0),(0,1 the correct PNG file appears in the filesystem but nothing is displayed and I get the error (in the terminal): file not found [Errno 2] No such file or directory: 'Users/guest/ MySAGE/MySAGE3/worksheets/_scratch_/cells/0/sage0.png' nomad66-243.d.umn.edu - - [23/May/2007 10:58:35] GET /Users/guest/ MySAGE/MySAGE3/worksheets/_scratch_/cells/0/sage0.png?1 HTTP/1.1 404 - So it seems that something is stripping the leading / from the path. I'm quite puzzled by this and as to how it could have gotten worse. -Marshall Hampton On May 18, 12:03 pm, William Stein [EMAIL PROTECTED] wrote: On 5/18/07, Marshall Hampton [EMAIL PROTECTED] wrote: Well, yeah, I'm sure it was dumb - my first guess was that the units were pixels - but I think the interesting thing is the subsequent effect on the worksheet. I haven't found a simple reproducible version of my more serious, previous problem which corrupts the entire notebook. I have several worksheets that I would like to 'rescue' from that - how do I copy worksheets from one notebook to another? Can I just recursively copy the entire worksheet directory? I think I tried that once and it gave me problems. The worksheet directory is -- unfortunately -- not what defines the worksheet. Can you view the worksheet and click edit? If so, you can then just paste the result into another edit of another worksheet in a different notebook. If this doesn't work for you, let me know. The notebook itself is stored in nb.sobj in the notebook directory, and one can directly recover a lot from it by simply directly loading it from Python command line. While I am on the subject, I am wondering how to restore the sort of .sws files that one can save from the notebook. Just open any worksheet, then click the upload button in the upper right of the notebook. (Yes, I know it is stupid that you have to open a worksheet in order to upload one.) Thanks, Marshall Hampton On May 17, 11:18 pm, William Stein [EMAIL PROTECTED] wrote: On 5/17/07, Marshall Hampton [EMAIL PROTECTED] wrote: I have a more reproducible version of this bug. If you execute the following three commands in seperate cells, you should see the sort of problem I am having: show(line(((0,0),(1,1 show(line(((0,0),(1,1))),figsize=[1280,800]) Gees -- that is crazy huge. A reasonable figsize would be something like [8,5]. I think the units of figsize are something like inches... You probably seriously exceeded the capacity of SAGE/matplotlib or your browser by making such a large figure. show(line(((0,0),(1,1 The middle command generates an error - I was originally trying to resize a more complicated figure and this syntax must be wrong. But then the show command won't work at all. Unlike my previous problems, however, stopping and restarting sage will fix this, as will creating a new worksheet. I sense they related somehow though. M.Hampton On May 16, 8:42 pm, Marshall Hampton [EMAIL PROTECTED] wrote: I copied/pasted it from the notebook, so its not a typo. I opened it by navigating manually through the filesystem
[sage-support] Re: notebook display error
I've attached the hg patch that fixes the notebook problem you've been reporting. You can apply it with hg_sage.apply('4585.patch') followed by sage -br (which will take 10 minutes).. Or, just wait for sage-2.5.4. On 5/24/07, William Stein [EMAIL PROTECTED] wrote: On 5/24/07, Marshall Hampton [EMAIL PROTECTED] wrote: Help! I was hoping to collaborate with someone using SAGE this week via a notebook, and I can't unless I get this fixed. Because I was getting errors as described above, where the leading / was missing on the path, I used a double // in my path for the notebook, i.e. a command starting out as: notebook('//Users/mh/test', address = '131. etc. This gave me no errors, but the graphics still don't display! I don't get it. I am now able to replicate this bug using the notebook you posted recently. This will get fixed for SAGE-2.5.4. However, as a temporary workaround, do the following: (1) start SAGE (2) cd to the directory that contains your notebook (3) Type notebook('MySAGE3') For example, I put your MySAGE3 on my Desktop. Then: sage: cd /Users/was/Desktop/ /Users/was/Desktop sage: notebook('MySAGE3',username='was',password='was') ... now it works ... --- Many thanks for finding this bug and persistently reporting it. It is users like you that really help to improve the quality of SAGE. Thanks! -- William M. Hampton On May 23, 11:07 am, Marshall Hampton [EMAIL PROTECTED] wrote: Stupid question: How do you directly load a .sobj file? This display problem seems to have actually gotten worse; now when I start up a brand-new notebook the problem appears right away. Upgrading to 2.5.3 didn't seem to help. In case it helps at all, I have created a record of my entire notebook directory at: http://www.d.umn.edu/~mhampton/MySAGE3.zip When I execute the only command: show(line(((1,0),(0,1 the correct PNG file appears in the filesystem but nothing is displayed and I get the error (in the terminal): file not found [Errno 2] No such file or directory: 'Users/guest/ MySAGE/MySAGE3/worksheets/_scratch_/cells/0/sage0.png' nomad66-243.d.umn.edu - - [23/May/2007 10:58:35] GET /Users/guest/ MySAGE/MySAGE3/worksheets/_scratch_/cells/0/sage0.png?1 HTTP/1.1 404 - So it seems that something is stripping the leading / from the path. I'm quite puzzled by this and as to how it could have gotten worse. -Marshall Hampton On May 18, 12:03 pm, William Stein [EMAIL PROTECTED] wrote: On 5/18/07, Marshall Hampton [EMAIL PROTECTED] wrote: Well, yeah, I'm sure it was dumb - my first guess was that the units were pixels - but I think the interesting thing is the subsequent effect on the worksheet. I haven't found a simple reproducible version of my more serious, previous problem which corrupts the entire notebook. I have several worksheets that I would like to 'rescue' from that - how do I copy worksheets from one notebook to another? Can I just recursively copy the entire worksheet directory? I think I tried that once and it gave me problems. The worksheet directory is -- unfortunately -- not what defines the worksheet. Can you view the worksheet and click edit? If so, you can then just paste the result into another edit of another worksheet in a different notebook. If this doesn't work for you, let me know. The notebook itself is stored in nb.sobj in the notebook directory, and one can directly recover a lot from it by simply directly loading it from Python command line. While I am on the subject, I am wondering how to restore the sort of .sws files that one can save from the notebook. Just open any worksheet, then click the upload button in the upper right of the notebook. (Yes, I know it is stupid that you have to open a worksheet in order to upload one.) Thanks, Marshall Hampton On May 17, 11:18 pm, William Stein [EMAIL PROTECTED] wrote: On 5/17/07, Marshall Hampton [EMAIL PROTECTED] wrote: I have a more reproducible version of this bug. If you execute the following three commands in seperate cells, you should see the sort of problem I am having: show(line(((0,0),(1,1 show(line(((0,0),(1,1))),figsize=[1280,800]) Gees -- that is crazy huge. A reasonable figsize would be something like [8,5]. I think the units of figsize are something like inches... You probably seriously exceeded the capacity of SAGE/matplotlib or your browser by making such a large figure. show(line(((0,0),(1,1 The middle command generates an error - I was originally trying to resize a more complicated figure and this syntax must be wrong. But then the show command won't work at all. Unlike
[sage-support] Re: Safari notebook
On 5/26/07, Justin C. Walker [EMAIL PROTECTED] wrote: Hi, all, I normally shy away from the notebook (being mouse-averse), but while fiddling with the new Sage.app (which is a nice addition, BTW), I noticed that when I reach the bottom of the visible page, and scroll down to make the next cell visible, enter an expression, and hit SHFT- Return, the page jumps back to the top. Is this known, and I just missed the discussion? That sounds like a bug. I'll add it to the list for the SD4 SAGE Notebook coding sprint, which is here: http://www.sagemath.org:9001/days4/projects By the way, everybody, now is a good time to report notebook bugs, so we'll have a long list of them to address during the SD4 notebook sprint. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: remote notebook starts
On 5/28/07, mabshoff [EMAIL PROTECTED] wrote: On May 28, 5:11 pm, Marshall Hampton [EMAIL PROTECTED] wrote: This is more of a unixy process control question but I am applying it to sage. I would like to start a notebook on my office machine while I am at a conference. I tried logging in with ssh, starting the notebook, suspending it with ctrl-z, and then putting the suspended process in the background with bg. This didn't really work, although I could still restart the notebook server with a browser. I could figure this out eventually but I am hoping someone reading this list already knows how to do this. There are several options: 1) use screen - see www.gnu.org/software/screen/ 2) use nohup - see man nohup 3) use disown - see http://www.faqs.org/docs/bashman/bashref_79.html All have their specific advantages, I would just go with screen. It might be worthwhile to offer an option for SAGE to demonize itself. That's a great idea; I've added it as http://www.sagemath.org:9002/sage_trac/ticket/381 Any thoughts on how, e.g., sage -notebookdaemon or ?? Also, how to implement it. I.e., could you be more precise about what it means to demonize SAGE? 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: request for list method for symbolic expressions
On 5/29/07, Timothy Clemans [EMAIL PROTECTED] wrote: HI, Could you implement a way to get a list or dictionary of a symbolic expression if it contains only one variable? sage: g = 6*x^2 - 5 sage: list(g) [6,0,-5] sage: dict(g) {2:6,1:0,0:-5} sage: g = 5*x^4 - x + 4 sage: list(g) [5,0,0,-1,4] sage: dict(g) {4:5,3:0,2:0,1:-1,0:4} You might want to consider using the coeffs method instead, since it will allow you to do what you want, or first convert to a polynomial and use list/dict. Here are some examples: sage: g = 6*x^2 - 5 sage: g.coeffs() [[-5, 0], [6, 2]] sage: list(g.polynomial(QQ)) [-5, 0, 6] sage: g.polynomial(QQ).dict() {0: -5, 1: 0, 2: 6} sage: g.polynomial(QQ).list() [-5, 0, 6] sage: g = 6*x^2 - 5 sage: g.coeffs() [[-5, 0], [6, 2]] sage: g.polynomial(QQ).list() [-5, 0, 6] sage: g.polynomial(QQ).dict() {0: -5, 1: 0, 2: 6} 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Symbolic rings
On 5/29/07, Kiran S. Kedlaya [EMAIL PROTECTED] wrote: I see that in recent versions of SAGE, referring to an object not previously created generates a Maxima symbolic object. That's not what's actually happening. What's happening is that the file sage/calculus/predefined.py predefines just the single letters of the alphabet (except e and i) to be symbolic variables. Is there a global toggle to turn on/off this behavior? I can see the value of this in an interactive setting, but when programming I would sometimes rather get an error when trying to refer to a previously undefined object. There is currently no function to clear these, so I just wrote one. The attached patch adds a function clear_vars() that when called removes all 1-letter symbolic variables that are currently defined. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~--- 4705.patch Description: Binary data
[sage-support] Re: Symbolic rings
On 5/30/07, Joel B. Mohler [EMAIL PROTECTED] wrote: There is currently no function to clear these, so I just wrote one. The attached patch adds a function clear_vars() that when called removes all 1-letter symbolic variables that are currently defined. I absolutely agree with the OP that these predefined things are not the right way to go for a programming environment. Wouldn't it be reasonable to cause these one letter variables to be defined at the same point in the sage script where you start IPython? Unfortunately I do not understand what you're suggesting. What is the sage script? What does starting IPython have to do with anything? Please clarify. Thanks! 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Error using Jones database of number fields
On 5/30/07, Utpal Sarkar [EMAIL PROTECTED] wrote: When trying to use the Jones database I get an error. J = JonesDatabase() works correctly and creates the instance. J.ramified_at([2,3,5]) generates an exception, both at my local installation and when executing it on an online notebook at http://www.sagenb.org/. I copied the stack trace from the second one Thanks for reporting this. I've rebuilt the database. To install the new version, do sage -i database_jones_numfield-v4.spkg Then restart SAGE and try again. below. When looking into the code, it turns out that the call that causes the error is self.root = load(JONESDATA+ /jones.sobj) where load is a function from the compiled library sage/structure/ sage_object.so. Traceback (most recent call last): File , line 1, in File /notebooks/server/sage_notebook/worksheets/doetoe/code/5.py, line 4, in J.ramified_at([Integer(2),Integer(3),Integer(5)]) File /notebooks/server/, line 1, in File /sage/local/lib/python2.5/site-packages/sage/databases/ jones.py, line 196, in ramified_at Z = self.get(S, var=var) File /sage/local/lib/python2.5/site-packages/sage/databases/ jones.py, line 167, in get self.root = load(JONESDATA+ /jones.sobj) File sage_object.pyx, line 433, in sage_object.load File sage_object.pyx, line 494, in sage_object.loads RuntimeError: No module named polynomial_element_generic invalid data stream invalid load key, 'x'. Unable to load pickled data. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Symbolic rings
On 5/30/07, Joel B. Mohler [EMAIL PROTECTED] wrote: So -- if you want to implement you suggestion, we just remove the import of predefined in calculus/all.py and put it in both all_cmdline.py and all_notebook.py. That's it. Would you take such a patch? No, since I just wrote one -- which will be in sage-2.5.4. It's attached. I suspect that of the N people on this list, there are about 2*N opinions about what should be automatically defined in the command-line vs. what should be automatically defined in a python script with from sage.all import *. I don't think there is any one right opinion on all that. That's what the JSAGE referees are for. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~--- 4726.patch Description: Binary data
[sage-support] Re: Working with class groups + bug?
Hi Utpal, Unfortunately number fields are not in the best shape in SAGE right now. There's been much discussion about this among some of the SAGE developers recently, and we will have a project about this at Sage Days 4 (which is in two weeks). So, basically, keep your questions and comments coming. They will help. On 5/30/07, Utpal Sarkar [EMAIL PROTECTED] wrote: To compute the abstract class group I can just create a number field K = QuadraticField(-23) and ask for it K.class_group() - Multiplicative Abelian Group isomorphic to C3 Is there a way to obtain representatives of the ideal classes (like in Magma where there is a second return value that is a map from the abstract group to the set of prime ideals? When trying to obtain generators by hand I encountered the following problem: p = K.factor_integer(2)[0][0] is a prime divisor of 2, which happens to have order 3 (the function p.order() is not implemented yet). p.is_principal() - False However: (p^3).is_principal() - False gives the wrong answer. This roundabout gives the correct answer len((p^3).gens_reduced()) == 1 - True but I encountered instances where the reduced set of generators is not as reduced as it could be, so this is not a reliable method. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: echelon form
On 6/1/07, Thea Gegenberg [EMAIL PROTECTED] wrote: The method echelon_form gives me an error when I try to take the echelon form of a zero matrix. It says TypeError: entries has the wrong length Here's an example to illustrate the bug. I hope somebody will fix it and send me a patch :-). sage: m = matrix(ZZ,3,3,[0]*9) sage: m.ech m.echelon_form m.echelonize sage: m.echelon() --- type 'exceptions.AttributeError'Traceback (most recent call last) /home/was/talks/2007-06-01-grants/ipython console in module() type 'exceptions.AttributeError': 'sage.matrix.matrix_integer_dense.Matrix_integer_de' object has no attribute 'echelon' sage: m.echelon_form() --- type 'exceptions.TypeError' --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Primitive Root of Unity in Finite Fields
On 6/3/07, David Joyner [EMAIL PROTECTED] wrote: Anyway... my problem is (and it might be an easy one) how to find the primitive n-th root of unity in a finite field? I noticed that for the complex numbers I could use E(n), I need something similar for a finite field. All I have at the moment is a way to find the primitive n-th root of unity for the cases when n = p^m - 1 where p is a prime and m 1. For this I use the PrimitiveRoot(GF(p^m)) which returns the primitive root of the finite field GF(p^m). The following examples illustrate how to compute a primitive root in a couple of cases: sage: R = Integers(7^5); R Ring of integers modulo 16807 sage: R.multiplicative_generator() 3 sage: R = GF(3^5,'a'); R Finite Field in a of size 3^5 sage: R.multiplicative_generator() a -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Chroot jail for SAGE
On 6/3/07, Michel [EMAIL PROTECTED] wrote: I would like to set up a SAGE server for use by undergraduate students (through the notebook). For obvious reasons I would like to limit severely what they can do. The option I like most is to run SAGE in a chroot jail. In my limited experience setting up a chroot jail is tricky (many libraries need to be copied to the jail etc...). Since I assume this is what http://www.sagenb.com/ does I would appreciate some pointers on how to go about this. You're right, that's exactly thwat sagenb.com does. Fortunately, if you look at Section 4 of the SAGE install guide it is all about this: http://sagemath.org/doc/html/inst/index.html It begins This section is by Bobby Moretti ([EMAIL PROTECTED]). Warning: This section has not been independently tested yet. Please read and use at your own risk. If you read it, please send feedback to Bobby Moretti ([EMAIL PROTECTED]). So you should definitely send some comments if you try this. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: help with SAGE
On 6/4/07, Sarah Reznikoff wrote: Maybe you remember me from Berkeley. Yep!! Anyway, I am trying to use your online SAGE worksheet to do a few calculations. If you have a minute, maybe you can set me straight here. It will probably be easy, since I am not too savvy with these things and am most likely doing something obviously wrong. To get started I want to reproduce a calculation that Jack Wagoner did using PARI, which is mentioned in his paper Strong Shift Equivalence Theory. He has a square matrix A with irreducible characteristic polynomial, and finds a set of generators for the number field Q(A) by using the PARI command buchgenfu(). Buchgenfu does not seem to be available through SAGE, but it looks like bnfclassunit should work. However, it doesn't give me the information Wagoner gets, and indeed it only returns a vector of length 9, which is curious. Here's what I'm typing: v=pari([1,0,0,-6,-5,-6,-3,1]) f=v.Pol() h=pari(bnfclassunit(f)) h to which it returns [f; [1,0]; [1,1]; [1]; [1,[],[]]; 1; 1; [2,-1];[]] Just use GP instead. It's an interface to the GP interpreter instead of the PARI C library itself. sage: v = gp([1,0,0,-6,-5,-6,-3,1]) sage: f = v.Pol() sage: f.bnfclassunit() [x^7 - 6*x^4 - 5*x^3 - 6*x^2 - 3*x + 1; [3, 2]; [6028199129, 1]; [1, x, x^6 - 6*x^3 - 5*x^2 - 6*x - 3, x^2, x^3 - x^2 - 3, x^4 - x^3 - 4*x, x^5 - x^3 - 6*x^2 - 4*x - 2]; [1, [], []]; 458.1702498816480192794551962; 1; [2, -1]; [x, x^6 - x^5 + x^4 - 6*x^3 + x^2 - 5*x + 2, 2*x^5 - 5*x^3 - 6*x^2 - 9*x - 5, 2*x^6 - 4*x^4 - 14*x^3 - 11*x^2 + 2*x + 2]] Also, if you type sage: f.bnfclassunit? for help. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Maxima (hence calculus) issues
On 6/4/07, Brandon Weeks [EMAIL PROTECTED] wrote: I had this same problem on a Intel Mac (Macbook), running 10.4.9. (1) I've put the relevant files for intel here: http://sage.math.washington.edu/home/was/tmp/libintl/ Put them in SAGE_ROOT/local/lib/ (2) I've changed the clisp package in SAGE to build --without-libintl, so hopefully this problem won't happen in the future. (3) I've put the libintl libraries in my SAGE_ROOT/local/lib/ for my binary build, just in case, and will post a new binary when it's done building. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: product operation
On 6/7/07, David Joyner [EMAIL PROTECTED] wrote: though for some reason it doesn't work on strings: sage: sum([S,A,G,E]) --- type 'exceptions.TypeError' Traceback (most recent call last) /mnt/hd200/sagefiles/sage-2.5.alpha2/ipython console in module() type 'exceptions.TypeError': unsupported operand type(s) for +: 'int' and 'str' The Python documentation for sum very specifically disallows summing strings for mysterious reasons: sum(sequence, start=0) - value Returns the sum of a sequence of numbers (NOT strings) plus the value of parameter 'start'. When the sequence is empty, returns start. With sum you often have to give the start value, but with strings that doesn't work: sage: sum(['S', 'A', 'G', 'E'], '') --- type 'exceptions.TypeError' Traceback (most recent call last) /Users/was/ipython console in module() type 'exceptions.TypeError': sum() can't sum strings [use ''.join(seq) instead] sage: - I think it must be some sort of efficiency issue, where ''.join(...) is much faster, or something. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: polymake installation failure
Hi Marshall, Please try doing sage -i polymake-2.2.p2.spkg and let me know whether or not it works. The problems were the one you listed below and that the internal layout of the cddlib spkg has changed (I've been slowly moving them all into the format Brian Granger suggested). William On 6/7/07, Marshall Hampton [EMAIL PROTECTED] wrote: In the spkg-install scipt for polymake, it has a line SAGE_GMP_VERSION=4.2.1.p1 and I tried changing that to SAGE_GMP_VERSION=4.2.1.p6 and made a new spkg with that change, and it still failed to build although it does seem to find gmp now. I can't figure out where the other path problems might be. -mh On Jun 7, 10:59 am, Marshall Hampton [EMAIL PROTECTED] wrote: Hi, Polymake and cddlib are crucial to my use of sage, so I hope someone can help. I have successfully installed them on my machines before, but now I cannot. I am currently using a fully upgraded sage, upgraded from 2.5.3. A log file from my installation attempt can be found at: http://www.d.umn.edu/~mhampton/polymake_failure.log It looks like the GMP library is the problem, from this fragment of the log: cddlib-094b/src/src-gmp/~/local/bin/ tar (child): /Users/mh/sage-2.5.3/spkg/standard/gmp-4.2.1.p1.spkg: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error exit delayed from previous errors Checking if your kit is complete... Looks good Writing Makefile for Poly::Ext This is ironic since my initial interest in sage was due to its successful installation of exactly these packages. -Marshall -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Taylor
On 6/7/07, Randy LeVeque [EMAIL PROTECTED] wrote: By the way, I'm just trying to figure out how sage does Taylor series. Maybe you can pass this on to whoever the best person is to chat with about this... In maple I can do things like mtaylor(u(x+h,t+k),[h,k],3); 2 u(x, t) + D[1](u)(x, t) h + D[2](u)(x, t) k + 1/2 D[1, 1](u)(x, t) h 2 + h D[1, 2](u)(x, t) k + 1/2 D[2, 2](u)(x, t) k which is very convenient for numerical analysis when computing truncation errors of finite difference methods (h and k are mesh widths in space and time). In sage a general expansion of this sort doesn't seem possible even in a single variable, e.g., sage: taylor(u(x+h),h,0,4) x + h Apparently an undefined function like u(x) is taken to be the identity map? To define a formal function, do u = function('u'). Then sage: u = function('u') sage: u(x + h) u(x + h) sage: diff(u(x+h), x) diff(u(x + h), x, 1) To get the Taylor expansion you would do this: sage: taylor(u(x+h),h,0,4) -- however -- this currently doesn't work in SAGE since we hadn't considered doing this yet. What happens is Maxima does the computation and outputs the following expression: 'u(x)+(?%at('diff('u(x+h),h,1),h=0))*h+(?%at('diff('u(x+h),h,2),h=0))*h^2/2+(?%at('diff('u(x+h),h,3),h=0))*h^3/6+(?%at('diff('u(x+h),h,4),h=0))*h^4/24 SAGE doesn't know yet how to parse the at function, so you get an error -- it will have to be added. [Note that I don't necessarily consider maxima the ultimate underlying engine for SAGE's symbolic computation capabilities -- but it does provide a very quick way for SAGE to have a powerful symbolic system for which a lot of subtle bugs have already been fixed (over the last 40 years of Maxima development). ] Definitely point out lots of things like this in your talk at SD4! -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Explicitly calling bitwise xor?
To avoid massive confusion the __xor__ operator is not defined for SAGE integers. Instead use the _xor function, which will be very fast: sage: n = 5; m = 17 sage: n._xor(m) 20 On 6/8/07, Andrew Budker [EMAIL PROTECTED] wrote: Hello, I'm getting the following error when calling the xor operator from a .py file: because sage interprets ^ as exponentiation, i imported the xor function from operator. whats even stranger, is that the xor seems to work from the command line just fine. -- 178 t0 = self.ideaMultiply(roundSubKeys[4], xor(temp[0],temp[2])) /home/abudker/Desktop/199/sage-2.5.0.2/devel/sage-main/sage/crypto/ element.pyx in element.Element.__xor__() type 'exceptions.RuntimeError': Use ** for exponentiation, not '^', which means xor thanks, -Andrew Budker -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Maxima requested additional constraints in solve()
On 6/9/07, Ted Kosan [EMAIL PROTECTED] wrote: When I use the solve() function with this code: var('r2') c = P*e^(r*n) d = P*(1+r2)^n solve(c==d,r2) I receive the following exception: ... TypeError: Computation failed since Maxima requested additional constraints (use assume): Is n an integer? Does anyone have any thoughts on ways to fix this problem? Thanks in advance :-) SAGE has an assume command for this purpose, but unfortunately so far we've only implemented assuming inequalities. However, if you type the following you can directly tell maxima that n is an integer and solve the above (this is how we'll implement assume n is an integer in SAGE): {{{ from sage.calculus.calculus import maxima as calcmaxima calcmaxima.eval('declare(n,integer)') var('r2') c = P*e^(r*n) d = P*(1+r2)^n solve(c==d,r2) /// [r2 == (e^r - 1)] }}} QUESTION: What notation in SAGE would you like for assuming that n is an integer? Would this be OK? {{{ assume(n, ZZ) }}} This would just call calcmaxima.eval('declare(n,integer)') {{{ forget() }}} would then forget that assumption, etc. It would be more natural to write assume(n in ZZ), but this won't work, since n in ZZ gets evaluated to false be Python before it gets passed to the assume command. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Maxima requested additional constraints in solve()
On 6/9/07, Joel B. Mohler [EMAIL PROTECTED] wrote: On Saturday 09 June 2007 13:16, William Stein wrote: It would be more natural to write assume(n in ZZ), but this won't work, since n in ZZ gets evaluated to false be Python before it gets passed to the assume command. This was exactly what I tried when the original e-mail was sent out and realized that it was immediately evaluated. I write this so people don't get the same erroneous idea that I had. I assumed that you could redefine __contains__ to return a symbolic constraint just like was done with the __ge__ and similar operators. But you can't and here's why: Here's box.py class Test: pass class Box: def __contains__(self, x): return Test() sage: import box sage: type(n) class 'sage.calculus.calculus.SymbolicVariable' sage: t = box.Box() sage: n in t True sage: t.__contains__(n) box.Test instance at 0xaf45688c That's really pathetic that the 'in' operator always coerces stuff to a boolean. It seems like a useless feature to me and (IMO) is a bug or mis-feature in python. There is probably a *lot* more behind that design choice that you know, especially from the point of view of efficiency. In any case, it's the way it is; I'm glad you posted the above example since I didn't know that. I do not think assume(n, ZZ) is that confusing or hard to use if it is very clearly documented with examples in the assume command? What do you think? 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Explicitly calling bitwise xor?
On 6/8/07, Andrew Budker [EMAIL PROTECTED] wrote: I should probably mention that i'm writing some crypto stuff, so the integers im dealing with are from the python ord() function (getting ascii values from strings). So the return type is a python long not a sage.integer. I can go back and construct sage integer versions of everything, but if there is another way to do it, I would greatly prefer that. Please post a better code snippet that illustrates what's going on? The error message below strongly indicates that you're doing an xor with some SAGE Elements not Python longs, so somehow your Python ints got converted to SAGE ints. If you post a bit more code, somebody can hopefully help. (Sorry that I misunderstood your original question.) -- William thanks. -Andrew On Jun 8, 11:04 pm, William Stein [EMAIL PROTECTED] wrote: To avoid massive confusion the __xor__ operator is not defined for SAGE integers. Instead use the _xor function, which will be very fast: sage: n = 5; m = 17 sage: n._xor(m) 20 On 6/8/07, Andrew Budker [EMAIL PROTECTED] wrote: Hello, I'm getting the following error when calling the xor operator from a .py file: because sage interprets ^ as exponentiation, i imported the xor function from operator. whats even stranger, is that the xor seems to work from the command line just fine. -- 178 t0 = self.ideaMultiply(roundSubKeys[4], xor(temp[0],temp[2])) /home/abudker/Desktop/199/sage-2.5.0.2/devel/sage-main/sage/crypto/ element.pyx in element.Element.__xor__() type 'exceptions.RuntimeError': Use ** for exponentiation, not '^', which means xor thanks, -Andrew Budker -- William Stein Associate Professor of Mathematics University of Washingtonhttp://www.williamstein.org -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: symbolic manipulations in fields
On 6/9/07, Jason Grout [EMAIL PROTECTED] wrote: I'm trying to do some symbolic calculations in a field, say GF(3). Is there a proper way to do this different than my example below? The approach below of using a fraction field of a polynomial ring containing my variables over the field I'm working in seems to work mostly, but there are some errors. Also, coerce(GF(3),1/2) doesn't seem to work--shouldn't it? GF(3)(1/2) works fine. Yes. You've found a bug. That the following simple example doesn't work is a bug in Martin Albrecht's new incredibly fast multivariate polynomial arithmetic code: sage: R.x,y,z = GF(3)[] sage: R(1/2) Traceback (most recent call last): ... TypeError: Cannot convert sage.rings.integer_mod.IntegerMod_int to sage.rings.rational.Rational I'm sure Martin will fix it very soon. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: maple
On 6/11/07, somebody wrote: That's the correct behavior. You're setting the x in Maple, not the variable x in SAGE. To set x in SAGE you would do sage: x = maple('5') To see that x was set in maple, do sage: maple.eval('x') and sage: matlab('x = 5') doesn't set the SAGE x or the matlab x but rather the python x? The SAGE x is the matlab x. But sage: matlab('x = 5') should be an error. In general, for any interface R or object R in almost all of SAGE, you do x = R(foo) to make an element of R. In particular, to make an object in a particular math software program such as maple or mathematica, you do x = R(foo), where foo is often a string and R is maple or mathematica. You can also just evaluate a line of code in the math software program, which is what .eval does, e.g., matlab.eval('x = 5') is exactly as if you type x = 5 into the matlab interpreter (in fact, that's exactly what happens). This may be confusing, but it's systematically the case throughout all SAGE and with all interfaces. Sorry, I'm getting a bit confused! You might want to look at the numerous examples in the reference manual: http://www.sagemath.org/doc/html/ref/node125.html and http://www.sagemath.org/doc/html/ref/module-sage.interfaces.maple.html For now I'm not worried about maple though and think I have enough going to say something about matlab. One more question though: should plot(x,y) in a %matlab cell work? Thanks, Randy -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: sage.scipy.org interactive tutorial link broken?
On 6/12/07, Jurgis Pralgauskis [EMAIL PROTECTED] wrote: Interactive Tutorial from sage homepage http://sage.math.washington.edu:8101/doc_browser?/tut/?tut.html says connection timed out :\ I can use http://www.sagenb.org//doc_browser?/tut/?tut.html but newcommers might get dissapointed in the misunderstanding Thanks. The SAGE notebook gets very heavily used and the chroot jail where it is hosted just ran out of disk space. I've cleaned things up and the notebook should be working again. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re:
On 6/13/07, Joseph Hufnagle wrote: Dear Sir, Is it possible to find the order of a point of an elliptic curve over a finite field using SAGE? I have been unable to find anything in the tutorial or reference. Thank You, Is the finite field GF(p) or GF(p^n) with n = 2. If the former, sage: e = EllipticCurve(GF(11),range(5)) sage: P = e([4,2]) sage: P.order() 6 In the latter case, also use the order method: sage: e = EllipticCurve(GF(11^2,'a'),range(5)) sage: P = e([4,2]) sage: P.order() WARNING -- using naive point order finding over finite field! 6 *However* this is very stupidly slow. Fortunately, Martin Albrecht (a sage developer) did send me a patch a few days ago that implements a very fast algorithm for computing the order of a point -- unfortunately, it's not in the current version of SAGE, though it will be in the next version, which will be released within a week. (I can also make the patch available to you if you need it.) 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Fwd:
-- Forwarded message -- From: Joseph Hufnagle Date: Jun 23, 2007 4:35 PM Subject: Re: To: [EMAIL PROTECTED] Dear Sir, Thanks for your timely reply. However, what you instructed me to do was not enough. The notebook computer I recently bought has wireless capability, so I disconnected my modem and connected to a wireless network. The Cremona Database downloaded and installed successfully. Once again, Thanks. From: William Stein [EMAIL PROTECTED] To: sage-support@googlegroups.com Subject: Re: Date: Sat, 23 Jun 2007 13:05:41 -0700 From: Joseph Hufnagle VMWare Player seems to work just fine in Windows Vista. I am, however having trouble downloading and installing the Cremona database. It attempts to download and returns 'Connection timed out'. Is something going on with the site that I should know about? The website is fine. Probably vmware and/or your computer is setup to not allow external connection from vmware to the rest of the world, hence you can't download that optional package from within vmware. I've not used vista (or possibly your anti-virus software) enough to know anything about configuring vista to allow vmware to connect to the outside world. One simple thing you could try is to: (1) shut down the vmware virtual machine (instead of typing notebook at the prompt type off). (2) Change the network to shared instead of Host only (this is the network drop down menu in vmware in the upper right/middle are of the screen) (3) Start vmware up and try again. This will use shared networking instead of host only networking, so I think getting a connection to the outside world will be very likely to work, irregardless of any settings in Windows Vista. Note, however, that you'll likely want to switch back to host only networking after you do this, since host only networking will give you a much faster and robust connection between vmware and your *local* web browser. William I bought a new laptop just to run Sage. It has Windows Vista Home Basioc on it. I didn't go for a 64-bit machine, so I can't tell you about that. Could my being trouble with downloading the Cremona database have anything to do with Vista? _ Get a preview of Live Earth, the hottest event this summer - only on MSN http://liveearth.msn.com?source=msntaglineliveearthhm -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: citing SAGE
On 6/26/07, Jason Grout [EMAIL PROTECTED] wrote: On the publication list for SAGE (http://sagemath.org/pub.html), it says to cite SAGE as: SAGE Mathematics Software, Version 2.6, http://www.sagemath.org/ Can we put up an official Bibtex version of this? Is the following sufficient? Yes, I like that. @misc{sage, Title = {{SAGE} Mathematics Software, Version 2.6}, Note = {\url{http://www.sagemath.org/}}} In the past, it seems that the preferred citation was the following paper. Is it not the preferred way of citing SAGE anymore? Yes. I used the citation below for a while, since John Cannon once told me that with MAGMA they always reference the same paper -- the first to mention MAGMA -- so it has a high citation count. In retrospect, I think that is stupid -- it's confusing, out of date, and the URL is wrong. Also, it doesn't make the version of the software used crystal clear. I think the critical properties that a citation for SAGE should have are: (0) a simple clear statement of what SAGE is: mathematical software (1) the URL http://www.sagemath.org, since I own that and it will always point toward SAGE, wherever I may go. (2) the version of SAGE used (3) what SAGE is, namely software. (4) I don't require that people list *me* personally -- I think it is much more important to track down the main parts of SAGE that your work depends on, and thank the authors of those packages, especially in the text. I was once told by the *author* of bibtex (who I met at a SAGE talk once) that one should use the note field and \url for referencing url's, as you do above. I don't like the below anymore, since (1) It suggests that SAGE was written by David Joyner and I only. (2) It suggests the paper is directly at http://www.sagemath.org, which is false (it's in a subdirectory) (3) The paper cited is in fact very out of date -- it was written a few months after SAGE-0.1 (!) By the way, I'm generally phasing out the acronym SAGE = (Software for Algebra and Geometry Experimentation) since SAGE is much more than that now. E.g., the next release of SAGE will include scipy, which is for serious numerical computation. What do people think? It's a good idea to have a clear bibtex reference that everybody sticks with as soon as possible, and I'm open to suggestions and feedback regarding the above points. -- William @article{sage, author = {Stein, William and Joyner, David}, title = {{SAGE}: System for Algebra and Geometry Experimentation}, journal= {Communications in Computer Algebra (SIGSAM Bulletin)}, year = {July 2005}, note = {{\tt http://www.sagemath.org}.} } Thanks, Jason -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: citing SAGE
On 6/27/07, David Joyner [EMAIL PROTECTED] wrote: Some journals require an author field, eg http://www.lib.monash.edu.au/tutorials/citing/ieee.html If the author isn't William Stein then who should it be? Some examples: 1. GAP uses The GAP Group (there is, AFAIK, no formal entity called the GAP Group; it just refers to the list of GAP contributors = developers+maintainers+people answering Support list questions http://www.gap-system.org/Contacts/People/people.html). [GAP2006] The GAP Group, GAP -- Groups, Algorithms, and Programming, Version 4.4.9; 2006. (http://www.gap-system.org) I really like that, i.e., for SAGE we could have The SAGE Group. I've updated http://www.sagemath.org/pub.html based on our discussions. 2. Singular uses the main developers [GPS05] G.-M. Greuel, G. Pfister, and H. Sch\onemann. {\sc Singular} 3.0. A Computer Algebra System for Polynomial Computations. Centre for Computer Algebra, University of Kaiserslautern (2005). {\tt http://www.singular.uni-kl.de}. I don't think that is so good, since it seems unfair to me to other developers not listed, and it makes it harder for the developer list to grow. I want no obstructions to the SAGE developer base growing. In fact, I really really want it to grow by a factor of 5 within the next year or so. It needs to, if we are to be able to match the multi-million dollar resources of Matlab/Mathematica/Maple. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: mixed volumes
On 6/27/07, Marshall Hampton [EMAIL PROTECTED] wrote: Does anyone know a way to compute mixed volumes in sage right now? I don't think polymake has this capability. If there isn't one, I will try to create one using PHCpack. -M.Hampton I don't know of anything in SAGE for this, but Chuck Doran remarks: -- Forwarded message -- From: Charles Doran Date: Jun 27, 2007 3:18 PM Subject: Re: Fwd: [sage-support] mixed volumes To: William Stein [EMAIL PROTECTED] Hi William, There seems to be some sort of distributed system for computing mixed volumes that was implemented in the mid-1990's. See: ftp://ftp-sop.inria.fr/galaad/emiris/publis/GEdistrCG97.ps.gz for details. The algorithms don't seem too hard to implement, so maybe it would be better to just have Marshall go ahead and do it. Best, -- Chuck --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: solve() question
On 7/2/07, David Harvey [EMAIL PROTECTED] wrote: Because I is the square root of -1. Yep. If you want I to be a symbolic variable do sage: I = var('I') sage: a = E == I * R sage: solve(a, R) [R == (E/I)] In general, it is always a good idea to use the var command to explicitly construct any symbolic variables you are going to use. It's a flexible and easy-to-use command. Not only does it allow many variables in input (separated by spaces), but it returns them as a tuple and also defines all the variables as a side effect (at least when used interactively from the prompt): sage: var('a b I XYZ theta') (a, b, I, XYZ, theta) sage: theta theta -- William sage: type(I) class 'sage.functions.constants.I_class' sage: type(J) class 'sage.calculus.calculus.SymbolicVariable' sage: type(R) class 'sage.calculus.calculus.SymbolicVariable' Yeah this is pretty confusing if it's not what you expected. david On Jul 3, 2007, at 7:18 AM, Ted Kosan wrote: Does anyone have any thoughts on why solve() returns [R == -1*I*E] in the following SAGE session? Thanks in advance :-) Ted -- | SAGE Version 2.6, Release Date: 2007-06-02| | Type notebook() for the GUI, and license() for information.| -- sage: a = E == I * R sage: a E == I*R sage: solve(a,I) [I == (E/R)] sage: solve(a,R) [R == -1*I*E] -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Square screen in plotting
On 7/4/07, Bobby Moretti [EMAIL PROTECTED] wrote: On 7/4/07, Timothy Clemans [EMAIL PROTECTED] wrote: How do I get my plots to look square. Like when I plot circles, they don't look like circles, because the viewing area is not square. Pass figsize = [n, n] as an argument to show(), where n is the size in inches. In order for this approach to work in general you also have to make sure to pass xmin, xmax, ymin, ymax to the show command, e.g., show(plot(sin(x),-pi,pi), xmin=-2, xmax=2, ymin=-2,ymax=2, figsize=[5,5]) It might make sense to add an option to the show command, e.g., show(, aspect=True), which, if set, would force a square aspect ratio on screen by making the ymin/ymax/xmin/xmax large enough and likewise adjusting figsize. Alternatively, one could adjust figsize relative to the given xmin/xmax/ymin/ymax.E.g., notice below how as long as the ratio of the figsizes is proportional to the ratios of the x and y span, you get a square aspect ratio. show(circle([0,0],1), xmin=-2, xmax=2, ymin=-1,ymax=1, figsize=[5,2.5]) Thoughts? 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: basic questions
On 7/4/07, harven [EMAIL PROTECTED] wrote: I am a new sage user and I have a few (basic) questions. I am using sage-2.6-intel-mac-i386-Darwin. 1) how do I rename a worksheet ? This is not possible with sage-2.6. With sage-2.7, which will be released within a week, it is trivial -- just click on the worksheet name. In case you're curious, you can try out the new SAGE notebook here: https://sage.math.washington.edu:8101/ This will be included standard in SAGE = 2.7. 2) how do I save a worksheet under another name (save as) ? Same answer as (1) 3) how do I completely remove output from a worksheet (not hide - remove) ? I don't understand the question. Perhaps the answer is to just delete the input cell that produced the output. You delete an input cell by deleting all its contents then pressing backspace in the cell. 4) is there a way to make animated plots ? I added this to SAGE-2.7 recently. This is not available in SAGE-2.6. The middle of this page has an example of an animated plot: https://sage.math.washington.edu:2007/home/pub/58/ It was produced by just making a bunch of graphics and using the new plot_animated_gif command. Note --- the command name for plotting an animated gif may change in SAGE-2.7, e.g., if v is a list of plots, it might change to: show(animate(v)) which is much more logical. 5) is there a way to sum infinite series, eg sum (1/n^2), n positive integer ? SAGE doesn't have a native way to do this *yet*. Fortunately, SAGE includes Maxima and Maxima can do this: sage: maxima('sum(1/n^2, n, 1, inf), simpsum') %pi^2/6 sage: maxima('sum(1/n^4, n, 1, inf), simpsum') %pi^4/90 sage: maxima('sum(1/n^3, n, 1, inf), simpsum') zeta(3) See http://beige.ucs.indiana.edu/P573/node19.html for some examples of how to do finite and infinite sums using maxima (and mathematica). 6) is it possible to import a maple worksheet ? No. 7) finally, is there a faq ? My questions are pretty basic and were probably answered many times. I don't think there is a faq yet. I wish there were. Thanks for this great software, You're welcome. Enjoy! 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: installing SAGE
On 7/5/07, biozan [EMAIL PROTECTED] wrote: I've downloaded the .zip folder but I can't extract it. The diagnostic message says that there is an unexpected end of archive. I've tried downloading the file twice but for both times, I received the same error message. Please advise. Thanks. Assuming you intend to install SAGE on MS Windows, the file you need to download is the one available here: http://www.sagemath.org/SAGEbin/microsoft_windows/ The file, once you download it, should have size about 442MB. If it doesn't, then your download was corrupted. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: installing sage on mac
On 7/5/07, Marshall Hampton [EMAIL PROTECTED] wrote: Oops - at the end of that first paragraph, I meant to say: then type 'make'. Sorry. The source instructions do cover most of it, just make sure you have the OS X development tools installed. And make sure you have a recent version -- if you have tools from a year ago, it won't work (they were buggy). In any case, I'm pretty sure the original poster didn't want to build from source. He had probably downloaded the source tarball by mistake and really wanted the binary tarball. On Jul 5, 8:47 pm, Marshall Hampton [EMAIL PROTECTED] wrote: By double-clicking, you should have a folder called sage-2.6. Call up a terminal window (the Terminal app is in Applications/Utilities, or you can just search for Terminal in Spotlight (the upper right search bar)). Then cd into the sage-2.6 directory by typing 'cd sage-2.6' (without the quotes). If this doesn't work, you may not have the OS X development tools installed. They come on the installation disk for your mac, but are not installed by default. Install those packages and try again. The source instructions are at:http://modular.math.washington.edu/sage/doc/html/inst/node6.html and they might help as well. If you still have problems, feel free to post again. -MH On Jul 5, 5:51 pm, danny [EMAIL PROTECTED] wrote: I tried to post this before and it didn't pop up on the discussions thign so i'm trying again.. I am trying to install sage on my mac notebook. i followed the instructions given.. first i downloaded the .tar file.. then i double clicked it to extract or whatever. and the instructions said to then click on the sage icon.. only there is no sage icon only a folder with a bunch of other folders in it and I dont know how to build things from source. If anyone can help that would be great. Thank you. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Fwd: [SAGEsupport] linear algebra
On 7/11/07, David Joyner [EMAIL PROTECTED] wrote: I'm trying to use sage to do some linear algebra (specifically, finding the equation to a plane, given 3 points in the plane). M=MatrixSpace(RR,3,1) N=MatrixSpace(RR,5,3) #Coordinates of the 3 points P1=M([[67.3,134.6,-10]]) P2=M([[246.8,145.3,0.0]]) P3=M([[189.0,34.4,15]]) alpha=P2-P1 beta=P3-P1 x=M([[1.0,0.0,0.0]]) y=M([[0.0,1.0,0.0]]) z=M([[0.0,0.0,1.0]]) # This should broduce a matrix of 5 rows x 3 columns (I think) mat=N([[x.transpose(),y.transpose(),z.transpose(),alpha.transpose(),beta.transpose()]]) Exception (click to the left for traceback): ... TypeError: entries has the wrong length If someone could explain where I' going wrong, I'd be most grateful. You could create mat using the following two commands: v = sum([list(k.transpose()) for k in [x,y,z,alpha, beta]], []) mat = N(v) I've illustrated this here: https://sage.math.washington.edu:8103/home/pub/1462/ By the way, you might want to use RDF instead of RR in this case, since it's probably much faster and you likely don't need arbitrary precision reals. RDF is standard double precision real number arithmetic. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Plotting semi log graphs with matplotlib.pylab.semilogy
On 7/11/07, Ted Kosan [EMAIL PROTECTED] wrote: I would like to plot a list of values on a semi log graph and I think that matplotlib.pylab.semilogy has the functionality I need. Can someone post a short example of the best way to access matplotlib.pylab.semilogy from within SAGE? I have been studying SAGE's plot module's source code for clues on how to do this but I have not had much luck so far. Fortunately, because of some well-thought out ideas in designing the SAGE notebook (thanks Tom Boothby!) It is very easy to produce graphics that embed in the notebook even if SAGE doesn't have any explicit support for them. For example, you can easily do *any* example in the entire matplotlib documentation directly as follows (this is just the first complicated example from the matplotlib examples): # - from pylab import * t = arange(0.0, 2.0, 0.01) s = sin(2*pi*t) plot(t, s, linewidth=1.0) xlabel('time (s)') ylabel('voltage (mV)') title('About as simple as it gets, folks') grid(True) savefig('sage.png') # -- (I posted this at https://sage.math.washington.edu:8103/home/pub/1463/ ) The key point above is that we call savefig to save the current maplotlib image to a file -- when done in the notebook, it will notice that a new file was created and display it immediately. Presumably on the command line it will produce an image. I've always planned to make it a lot clearer to people that SAGE comes standard with a complete clone implementation of matlab's 2d plotting functionality... This should really go right in the tutorial and in the documentation for SAGE's current plotting code. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Fwd: [SAGEsupport] linear algebra
On 7/11/07, Martin Albrecht [EMAIL PROTECTED] wrote: On Wednesday 11 July 2007, David Joyner wrote: Looks like SAGE isn't too happy about the inner matrices, converting them to lists works, though: Hi, I would happily accept a patch to matrix/matrix_space.py that makes the __call__ method a bit more flexible, i.e., so it would accept matrices (and convert them to list on the fly). William sage: mat=N( [ x.list() ,y.list(), z.list(), alpha.list(), beta.list() ] ) sage: mat [ 1.00 0.000 0.000] [0.000 1.00 0.000] [0.000 0.000 1.00] [ 179.5000 10.7 10.0] [ 121.7000 -100.2000 25.0] Justin, if I understood your question correctly, here is how to 'explode' lists: sage: l = [10,10,1) sage: matrix(ZZ, l) TypeError blabla sage: matrix(ZZ, *l) [1 0 0 0 0 0 0 0 0 0] [0 1 0 0 0 0 0 0 0 0] [0 0 1 0 0 0 0 0 0 0] [0 0 0 1 0 0 0 0 0 0] [0 0 0 0 1 0 0 0 0 0] [0 0 0 0 0 1 0 0 0 0] [0 0 0 0 0 0 1 0 0 0] [0 0 0 0 0 0 0 1 0 0] [0 0 0 0 0 0 0 0 1 0] [0 0 0 0 0 0 0 0 0 1] sage: matrix(ZZ, 10 , 10 , 1) [1 0 0 0 0 0 0 0 0 0] [0 1 0 0 0 0 0 0 0 0] [0 0 1 0 0 0 0 0 0 0] [0 0 0 1 0 0 0 0 0 0] [0 0 0 0 1 0 0 0 0 0] [0 0 0 0 0 1 0 0 0 0] [0 0 0 0 0 0 1 0 0 0] [0 0 0 0 0 0 0 1 0 0] [0 0 0 0 0 0 0 0 1 0] [0 0 0 0 0 0 0 0 0 1] Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99 _www: http://www.informatik.uni-bremen.de/~malb _jab: [EMAIL PROTECTED] -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: preserving source on install
Do sage -i -m package.spkg to build and install a package. The resulting build directory is left in spkg/build/package/ - william On 7/12/07, didier deshommes [EMAIL PROTECTED] wrote: 2007/7/12, Marshall Hampton [EMAIL PROTECTED]: Is there a way to install sage so that no source files are deleted? I am interested in hacking the cddlib source that is used in polymake, but it looks like it gets deleted after compilation. Is there an Every .spkg file is bascially a tar ball. I don't know about the specifics of cddlib, but if yo do $ tar -jxvf cddlib.spkg it should decompress the source to cddlib in a directory of the same name. Hope that helps. didier -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: calling uploaded python files in notebook
On 7/11/07, Timothy Clemans [EMAIL PROTECTED] wrote: Hi I want to upload a matplotlib file that has command line args. How do I upload that file and do python arrow_demo.py realistic There is a slightly hack-ish way to do this, but it is possible. Basically, just do something like this in an input cell: %sh python ../../data/foo.py x y z See this example: https://sage.math.washington.edu:8103/home/pub/1465/ --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Subtracting symbolic equations
On 7/16/07, William Stein [EMAIL PROTECTED] wrote: I am experimenting with subtracting symbolic equations from each other but I am running into some difficulties which are shown in the following example: No symbolic arithmetic is implemented. I'll implement it right now and post a patch. I mean no arithmetic with symbolic equations is implemented (yet). 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Subtracting symbolic equations
I am experimenting with subtracting symbolic equations from each other but I am running into some difficulties which are shown in the following example: OK, I've implemented symbolic arithmetic. I also implemented n as an alias for numeric_approx. They are both in the attached patch, which you can either apply (via hg_sage.apply('5302.patch') followed by sage -br) -- or you can wait for SAGE-2.7, which will (really) be released fairly soon (now that I'm back from vacation). 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~--- 5302.patch Description: Binary data
[sage-support] Re: Re:
On 7/17/07, David Stahl (PAVCO) [EMAIL PROTECTED] wrote: Hi William, Thank you for getting back to me so quickly. I tried this method but I get error opening input file. As I have done for sage scripts before, I put the gp script in C:\ and used cd .. to make C:\ my current directory. I can see my gp script when I type ls. Any thoughts What operating system are you using? How are you running SAGE? --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Re:
On 7/17/07, David Stahl (PAVCO) [EMAIL PROTECTED] wrote: Windows 2000 with coLinux I'm no longer supporting SAGE running via colinux. The recommended way to run SAGE under Windows is via VMware. There's a premade machine here: http://www.sagemath.org/SAGEbin/vmware/ That said, your problem is likely that SAGe doesn't have access to your gp scripts. You'll have to get them into colinux somehow (or use vmware, and again you have to get them into vmware). One somewhat silly way is to put the file somewhere online and use the get_remote_file command (available in recent versions of SAGE) to download the file into SAGE. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re:
On 7/19/07, David Stahl (PAVCO) [EMAIL PROTECTED] wrote: Hi William, I am sorry to be a bother but I have spent hours trying to figure out how to manipulate individual elements of a matrix. All I am trying to do is subtract an integer from an element of an integer matrix. Would you please give send me an example or a reference? Thank you. sage: m = matrix(ZZ,2, range(4)) sage: m[0,0] = m[0,0] - 3 sage: m [-3 1] [ 2 3] --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] SAGE-2.7!
Hello, I've released SAGE-2.7. Download the source here http://sagemath.org/sage/dist/src/ or get a binary here http://sagemath.org/sage/download.html I've posted binaries for the standard platforms, but haven't updated the vmware image yet. This is a very significant upgrade from the previous version of SAGE, primarily because: 1. The *SAGE notebook* was almost completely rewritten. 2. SAGE now includes a wide range of functionality for *numerical* computation and applied mathematics; in particular, SAGE includes both scipy for scientific computation and cvxopt for optimization standard. 3. Building SAGE now involves *Fortran*. On most systems a gfortran binary is downloaded and installed as part of the build process. There is also nontrivial support for using Fortran (and Fortran libraries) from SAGE and in the SAGE notebook, and in Python files (mainly via numpy, f2py, and new code by Josh Kantor). WARNING: Because of (2), building and upgrading SAGE is unfortunately now more difficult rather. In fact, I expect there to be upgrade and build issues with SAGE-2.7 -- making scipy buid on most anything is not easy. That said, SAGE now has functionality for addressing a huge range of mathematics, certainly far more than any other free mathematics software. Please try this out and let me know about the show-stopper bugs/issues, and send me updated patches, so I can release sage-2.7.1 early next week. After that, the plan is to incorporate all of Didier Deshomme and Brian Granger's great packaging work into SAGE, and work toward having .deb's, etc. The main highlights of the release include though following, though I've likely missed many people's contributions (which are listed in the detailed changelog).As usual, there are still many patches in my inbox that I still haven't got into a stable enough form to include yet. Resending me your not-included patches as patches against sage-2.7 would be appreciated. * m albrecht: a huge patch of fast multivariate poly arithmetic code, etc. * r bradshaw: enhancements to sagex; merge with official pyrex. * d harvey: generic convolution function * d joyner (refereed by n alexander): large permutation group improvements patch. * j kantor: excellent fortran support (e.g., %fortran in the notebook) * j kantor and w stein: new standard SAGE packages -- blas: fortran low level linear algebra cvxopt: convex optimization, linear programming, sparse linear algebra f2c: fortran to c conversion program gfortran: binaries lapack: fortran high-level linear algebra library scipy: latest svn version * r miller, e kirkman, t boothby: substantial bug fixes and improvements to graph theory code. * w stein: upgrade to latest svn version of scipy (much easier to build, etc.) * w stein with b moretti, y qiang, a clemesha, d ramier, t clemans, and t boothby: rewrite of the SAGE notebook; use twisted; more robust security model, etc. * w stein: removed Mark Watkins's ec from SAGE. * w stein: upgraded to mercurial-0.9.4 * w stein: included sympy-0.4.2 standard with SAGE (do import sympy) * g tornaria: improvements to the SAGE base coercion code and free modules * c wuthrich: p-adic BSD bounds Many many other people contributed to this release. -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Fwd:
David, I'm forwarding your question to sage-support. You should subscribe if you haven't already: http://groups.google.com/group/sage-support -- Forwarded message -- From: David Stahl (PAVCO) [EMAIL PROTECTED] Date: Jul 22, 2007 2:27 PM Subject: To: William Stein [EMAIL PROTECTED] Hi William, I used the groebner_basis() function of SAGE to solve for a system of nonlinear equations. My result is of the form: c1 + c2*y + c3*x*y^2 I would like to substitute a value in for y and then solve for x but can't figure out how to get SAGE to do this. Do you have an example you could email me? Thank you. David -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: an IDE for SAGE
On 7/19/07, ErikJacobson [EMAIL PROTECTED] wrote: I'm a high school math teacher and I've used python in the past to teach students about matrix operations, fractals, and basic programming concepts. Right now I'm working on a group of programs that do various probability simulations for use in probability courses at the high school and college levels. That sounds very interesting. I like the SAGE preprocessor (^ instead of **, 5/6 != 0, etc.) and would like to use SAGE functionality (especially matrices!) but I find the Notebook interface tedious. You can also use the command line. Are you using SAGE from Linux, OSX, or Windows? In the past I've used IDLE with students, I'd like to use DrPython in the future but the only way I know to run a SAGE program is to cut and paste into the Notebook. I'm worried that students will find the notebook interface more/too difficult than IDLE because it lacks text-highlighting, auto-indent, collapsible code blocks, robust find-replace, etc... We could implement many of these, but javascript just feels to sluggish for them, so haven't.In any case, the notebook was not designed to be used as an IDE, but for interactive work, though actually a lot of people use it as an intermediate step when developing serious code. Is there an easy/existing way to extend an IDE to support SAGE, both the preprocessor (in a shell environment?) and the functionality in stand-alone programs? I don't know. Probably one could in fact make IDLE work with the functionality of SAGE, etc. I haven't looked into this, since I have never been an IDLE user. Note that whether this even make sense for you probably depends somewhat on the operating system you're using to run SAGE. Where/how do more experienced SAGE users do their coding? Most SAGE developers do their coding in emacs, vim, or Apple's XCode IDE. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: an IDE for SAGE
On 7/23/07, Tim Lahey [EMAIL PROTECTED] wrote: I've been using the notebook combined with the Edit in TextMate feature of TextMate to do work in SAGE. For people without TextMate, I think someone has done an Edit in VIM which allows one to edit the Cocoa text-fields. So, if one uses Safari or any WebKit browser you're good. That said, I've been thinking about the possibility of using PyObjC and Cocoa to create a GUI for SAGE. I would be very supportive and enthusiastic about this. Brian Granger has created a Python spkg with good support for Cocoa and other native OS X libraries. I haven't included it yet in SAGE only due to lack of time, necessity, and testing, but want to include it soon. It would make building a GUI easier. I'd like to bundle all the SAGE components inside a single .app bundle so people could just download that and run SAGE like any normal applications. Michael Abshoff did a ton of work toward this, but some work remains to be done. If you want to give it a shot check out for the current version: http://sage.math.washington.edu/dotapp/ As a first cut, WebKit and the notebook interface could be used, but I'd like to see something that is a cross between MATLAB and Maple. That is, have a decent editor built-in that is tied to a worksheet interface. I suspect I won't be able to work on this for a while, but since PyObjC is being re-vamped for Leopard, it may be best to wait until Leopard is released. That make sense. Please bring this up again when the time is right. I'll be very supportive. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Compiled Code
On 7/24/07, Green Kobold [EMAIL PROTECTED] wrote: Thanks William, that was very elucidating. BTW, SAGE was very helpful in some recent developments, I indeed mentioned SAGE with some emphasis on a computer music article recently accepted (if it helps SAGE project, I can send some infos in the occasion of its publication). Yes, it would help SAGE greatly if you could send some info. I'll post a link or info about the publication here: http://sagemath.org/pub.html back to the executable issue: I am not very experienced with programming, actually I only know a little of python. So I can spend some weeks on a senseless plan b. I've already done some executables from python code, using cx_freeze. I don't know really anything more useful about making standalone executables from python, etc., code, like you're discussing, unfortunately. Sorry. I hope somebody else has some ideas. -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: sage 2.7 install problem
Dear SAGE developers, I tried to install sage-2.7 on my computer (32 bit Linux, Fedora 6) and I got the following (this happened both when I downloaded the binary as well as when I compiled the source). Hi Mark, SAGE doesn't work with SELinux enabled. We haven't got to the bottom of why yet. Would it be possible for you to disable SELinux? It's enabled by default with Fedora core, for some reason. (Mark, by the way I'm interested in visiting FSU sometime and giving a talk. I work closely with Amod Agashe, who is one of your colleagues there.) localhost:~/sage-2.7$ ./sage -- | SAGE Version 2.7, Release Date: 2007-07-19 | | Type notebook() for the GUI, and license() for information.| -- --- type 'exceptions.ImportError' Traceback (most recent call last) /home/hoeij/sage-2.7/local/bin/ipython console in module() /home/hoeij/sage-2.7/local/lib/python2.5/site-packages/sage/all_cmdline.py in module() 12 try: 13 --- 14 from sage.all import * 15 from sage.calculus.predefined import x 16 preparser(on=True) /home/hoeij/sage-2.7/local/lib/python2.5/site-packages/sage/all.py in module() 51 get_sigs() 52 --- 53 from sage.misc.all import * # takes a while 54 55 from sage.libs.all import * /home/hoeij/sage-2.7/local/lib/python2.5/site-packages/sage/misc/all.py in module() 57 from func_persist import func_persist 58 --- 59 from functional import (additive_order, 60 sqrt as numerical_sqrt, 61 arg, /home/hoeij/sage-2.7/local/lib/python2.5/site-packages/sage/misc/functional.py in module() 30 import sage.interfaces.expect 31 --- 32 from sage.rings.complex_double import CDF 33 from sage.rings.real_double import RDF, RealDoubleElement 34 import sage.rings.real_mpfr type 'exceptions.ImportError': /home/hoeij/sage-2.7/local/lib/libpari-gmp.so.2: cannot restore segment prot after reloc: Permission denied sage: H4sICCDmpEYAA2luc3RhbGwubG9 -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: problem running VMware-SAGE in laptop
On 7/24/07, harald [EMAIL PROTECTED] wrote: Hi William, as I have the same problem using VMWare Player 2.0 with sage- vmware-2.7 and Ramdin didn't reply... I've tried the Browser Appliance, and it worked allright. I've checked the Ubuntu and VMWare Forums, and the problem appears to be well known with CPUs that don't support PAE when running Ubuntu with the kernel in use. Thanks for pointing this out! I had thought we fixed the problem in sage-vmware-2.7 by disabling acpi (which another SAGE developer had suggested as the fix), but you're right PAE is also an issue. I looked and the kernel image included in sage-vmware-2.7 is some 686 SMP server image, which is probably the problem. I'll build a new sage-vmware-2.7.1 image when I release sage-2.7.1 later today, and it will uses the i386 generic kernel instead, which will hopefully fix this problem. Thanks for re-reporting this. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: sage 2.7.1 and gap workspace issue
On 7/24/07, David Joyner [EMAIL PROTECTED] wrote: Hi: The machine is a suse 10.2 amd64. I don't know if this is a serious issue or not but when i typed gap_console() I got a strange error: [EMAIL PROTECTED]:~/sagefiles/sage-2.7.1.alpha3 ./sage -- | SAGE Version 2.7.1.alpha3, Release Date: 2007-07-22| | Type notebook() for the GUI, and license() for information.| -- sage: gap_console() Couldn't open saved workspace /home/wdj/.sage//gap/workspace-8521717861422049134 The command gap_reset_workspace() fixed this easily. Maybe the workspace was not properly saved in the first place?? Probably. Your fix to call gap_reset_workspace is the right thing to do and is quite harmless.I'm not sure what else to say, except that there is one gap workspace for each SAGE install that you have stored in .sage/gap/. It is hard to have gap_console() somehow know that there was a problem running GAP, unfortunately. --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: problem running VMware-SAGE in laptop
On 7/24/07, coolmathix [EMAIL PROTECTED] wrote: I realize there is some problem with sage-vmware-2.7 but I seem to be getting a different error message and would like to know if it is perhaps just me doing something dumb. I'm using Win XP, on a Dell 620 Notebook and on a Intel Pentium 4 Desktop. VMWare 2.0 installed fine on both computers and I rebooted them (as required by the installation). Then sage-vmware-2.7.zip unzips in a couple of minutes. But when I doubleclick on sage.vmx I get a VMWare message: Error while opening the virtual machine. This virtual machine appears to be in use. (followed by the path and file name of the sage.vmx configuration file). Has anyone else seen this behaviour? Or did I overlook some required step? I haven't exactly seen that, *but* check to see if any of the following files are in sage-vmware-2.7 directory: 564df9af-04b3-1add-cd03-a70643d41189.vmem.lck: M50425.lck Ubuntu-01.vmdk.lck: M64519.lck Ubuntu.vmdk.lck: M42766.lck sage.vmx.lck: M04605.lck swap-01.vmdk.lck: M46316.lck swap.vmdk.lck: M52355.lck If so, perhaps deleted them would help? --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: Fwd: %hide not hiding well
On 7/24/07, gani [EMAIL PROTECTED] wrote: Thanks for your response. Unfortunately, this fix didn't work for me. It just turned up in the notebook mode as items at the top of the cell. Does it matter what platform/browser one is using? I am using Windows(vmWare) and Firefox. That %hide doesn't work right is a bug. I or Tom Boothby will fix it in the near future. Fixing it didn't quite make it into SAGE-2.7.1. On a related topic, I have 2 questions: 1. When printing a worksheet to either pdf or to printer, the cell box is expanded making it look like multiple empty lines are included after the final cell content. Can that be fixed easily? Probably. I'll look into it. I really want to switch to generate a latex version of a worksheet for printing, then a pdf from that. It would look gorgeous, professional, etc.; much better than now. Any thoughts about that? 2. Is there a way to modify the input/output font size and color? Unfortunately not easily from the GUI, but there should be. I'll keep that feature request in mind. With a latex version this sort of thing would be easier. One thing you can do is override *any* css in the notebook, which would allow you to change the fonts or colors. This would require creating a notebook.css file somewhere, and would be quite painful from windows using the VMware interface. William -- 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: problem running VMware-SAGE in laptop
On 7/24/07, coolmathix [EMAIL PROTECTED] wrote: I realize there is some problem with sage-vmware-2.7 but I seem to be getting a different error message and would like to know if it is perhaps just me doing something dumb. I'm using Win XP, on a Dell 620 Notebook and on a Intel Pentium 4 Desktop. VMWare 2.0 installed fine on both computers and I rebooted them (as required by the installation). Then sage-vmware-2.7.zip unzips in a couple of minutes. But when I doubleclick on sage.vmx I get a VMWare message: Error while opening the virtual machine. This virtual machine appears to be in use. Hi, I've posted a new sage-vmware-2.7.1.zip sage appliance to http://www.sagemath.org/SAGEbin/vmware/ I was careful to make sure there are no lock files in the zip archive. I also replaced the server kernel with a generic i386 kernel, which should work on far more machines. Finally, it's fully upgraded to sage-2.7.1. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: SAGE notebook question
Omit the username/password arguments and access all your old worksheets by going to the published docs web page. All your old worksheets should have migrated there. If not let me know. - William (Sent from my cell phone.) On Jul 26, 2007, at 12:02 PM, Jacob Lewis [EMAIL PROTECTED] wrote: Hi William, I was wondering if you could give me a little advice about a SAGE problem I'm having. Until recently, I've used sage by logging on to sage.math, running sage, and typing notebook(address=sage.math.w ashington.edu, username=jacobml, password=), then opening Iceweasel and logging on to the notebook server with my username and password. But in the last few days, this has stopped working (sage now responds type 'exceptions.TypeError': notebook_t wisted() got an unexpected keyword argument 'username'). I can stil l type notebook() and make a new notebook as root, but I can't acce ss my old notebooks. Any advice you could give on how to reach my o ld notebooks, or how I SHOULD run notebook, would be appreciated. Thanks, Jacob --~--~-~--~~~---~--~~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] SAGE's crypto package
Tim, Regarding your crypto in SAGE question, I don't actually have that good of a sense for the current crypto code in SAGE. You should definitely ask David Kohel some questions about the crypto package (David R. Kohel [EMAIL PROTECTED]). It would to explain who you are, that you're just learning crypto, etc. Keep in mind that David is often really busy right now with a job change, etc., so he might only respond sporadically. Please cc me or sage-support, if it gets interesting. If nothing else, you'll make sure David realizes people are using his code and increase the chances that he'll improve it. I think David also has some course notes that go along with his code, which you could request or maybe find on his website: http://echidna.maths.usyd.edu.au/~kohel/index.html -- William -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: matrix basics
On 7/26/07, David Joyner [EMAIL PROTECTED] wrote: On 7/26/07, mak [EMAIL PROTECTED] wrote: 1. How do I change the entire row or column of a matrix at once? In pari, I could do e.g. a=[1,2,3;4,5,6], and then put a[1,]=[0,0,0], which would give a=[0,0,0;4,5,6]. What's the sage equivalent? There is no SAGE equivalent yet. David's example might be helpful below though. The best you could in SAGE is set each entry one at a time right now. I should add something. def set_row(A, r, v): for i in range(A.ncols()): A[r, i] = v[i] I'm not sure how we forgot to ever do this. I've added this to the trac server: http://www.sagemath.org:9002/sage_trac/ticket/405 sage: a=[[1,2,3],[4,5,6]] sage: A = matrix(a) sage: A [1 2 3] [4 5 6] sage: a[0] = [0,0,0] sage: A = matrix(a) sage: A [0 0 0] [4 5 6] 2. I enter a 100x100 matrix and the notebook doesn't display it; I just get something like '100x100 matrix with integer coefficients'. I'd like the matrix displayed explicitly (at my own risk). Clicking to the side doesn't have any effect. If a is the matrix do print a.str() and you'll see it all. Doing show(a) in the notebook might also be useful. Also, doing print a[5] would show you just the 5th row and print a[:5].str() the first 5 rows (I think). I don't know. Maybe something like this would help: sage: MS = MatrixSpace(IntegerModRing(5),100,100) sage: A = MS.random_element() sage: A.matrix_from_rows_and_columns(range(10), range(20,38)) [1 2 4 3 2 1 1 2 4 3 4 1 1 2 4 1 1 3] [4 1 3 4 1 0 0 1 1 0 0 4 2 0 1 0 0 2] [1 0 0 1 2 2 1 1 3 0 0 0 2 2 1 1 2 1] [4 1 3 4 1 2 1 0 1 2 3 3 1 2 2 1 3 3] [3 4 0 2 1 4 1 1 1 1 0 1 3 4 1 4 1 0] [1 1 2 0 3 3 0 1 0 4 3 2 3 1 3 4 3 3] [0 0 1 1 0 0 2 3 2 4 2 4 3 2 1 3 2 2] [3 2 1 4 1 2 2 3 1 0 1 2 1 0 3 0 1 3] [1 3 0 2 2 1 3 4 3 0 3 0 2 2 0 0 0 2] [2 0 0 4 3 4 4 3 1 0 4 3 4 0 3 0 2 0] Thanks, Mak -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: substitution in a matrix (newby)
On 7/26/07, Roger Mason [EMAIL PROTECTED] wrote: You should do m.substitute(a=1) just like you're doing -- unfortunately, nobody implemented that yet, and it's doing some dumb generic behavior. [...] Fortunately, I just implemented this for SAGE-2.7.1, which I'll release very very soon. Thank you both very much. It seems I need a careful read of the user manual, I had not picked up on lambda expressions. I am compiling 2.7.1 so will soon be able to test blah.substitute(a=1). I don't know if lambda expressions are discussed in the user manual. The SAGE language is Python, and Python has a very nice lambda expression. Thus this nicely written book also applies to SAGE: http://docs.python.org/tut/ The section on lambda expressions is here: http://docs.python.org/tut/node6.html#SECTION00675 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: matrix basics
On 7/26/07, Dan Christensen [EMAIL PROTECTED] wrote: There is no SAGE equivalent yet. I really miss the numpy syntax, including broadcasting. For example, Naive question: what exactly is broadcasting, and how might it be useful in the context of SAGE? Probably it's something to add to the todo list. a[1] is the second row SAGE does that, though it returns a new vector rather than a reference. Numpy has a cool r_[...] notation for making matrices -- any thoughts about that? Should SAGE implement it too? a[1:3]is the subarray consisting of the second and third rows a[:, 1] is the second column a[:, 1:3] is the subarray consisting of the second and third columns a[:, 1:3] += 2 adds 2 to each element in that subarray I can't see any real reason not to add this sort of functionality to SAGE. Maybe we could even consider making the generic dense matrices in SAGE have an underlying numpy representation (i.e., where we don't use our own underlying C representation of the data). But there's a lot more you do, concisely and with the loops done in C. (Implicitly, I also like that numpy allows multiple views into the same data.) Cool. 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---
[sage-support] Re: input/output
On 7/27/07, David Joyner [EMAIL PROTECTED] wrote: On 7/27/07, mak [EMAIL PROTECTED] wrote: 1. What's the most elegant way of writing a matrix into a file in pari-readable format? I can make it into a string, open a file, write the string, close the file. 2. How do I specify the directory where the file is saved? sage seems to not understand the path like '~/desiredpath/ desireddirectory', so I have to back up '../' 5-6 times from sage's default directory ('worksheets/_scratch_/cells/93/' or something like that) Here's an example that saves a SAGE matrix to a pari matrix in the file ~/foo.gp: {{{id=0| m = random_matrix(QQ,5) }}} {{{id=1| home = os.environ['HOME'] open(home + '/mat.gp', 'w').write(m._pari_init_()) }}} {{{id=2| %gp \r /home/was/mat.gp /// [2 2 -1 1/2 2] [-2 0 0 -1/2 -1] [0 -1 -1 1 -2] [-2 1/2 1/2 -1 2] [-1 2 0 0 0] }}} The file sage-env in sage*/local/bin shows that names such as SAGE_ROOT are known to SAGE, so you can use it to help some. You can also add any directory to that script that you want SAGE to know. I've never had a problem using absolute paths. Possibly I'm not understanding your question correctly? I'm sorry to bother people with basic questions like this, but the documentation is far too technical for the casual user, and not easily searchable either. Thanks, Mak -- William Stein Associate Professor of Mathematics University of Washington http://www.williamstein.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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~--~~~~--~~--~--~---