[sage-support] Re: Notebook server sluggish in 3.4
I have seen this from time to time as well, though was never able to reliably reproduce it (and it hasn't happened to me for a while, so I thought it was fixed). Sometimes when running a calculation *or* adding/removing cells the notebook process (not the sage process actually doing the computation) gets pegged at 100% and the notebook becomes completely unresponsive. I wonder if hitting control-C while the notebook is in this state would shed any light on what it's actually doing? (Perhaps after disabling catching the control-C exception. - Robert On May 29, 2009, at 1:45 PM, Marshall Hampton wrote: > "This", for me, is extremely sluggish notebook behavior in creating > cells, and to a lesser extent autocompletion. I'm not sure if its > related to the "100% CPU" issue of Kiran. > > The first version I saw this in was 3.4, and its still there in > 3.4.2. But it seems much much worse on one of my servers than the > others - all of which are now running 3.4.2 on the same machine. I > just set up a seperate server for a small class and it seems fine, > which makes me wonder if the age of my sluggish server is the problem > - there are hundreds of worksheets from a variety of users on it. > This is on an intel mac pro running OS 10.4. > > Its very frustrating to my grad students; they sometimes have to wait > 10-20 seconds for a new cell to be created after clicking. Its almost > impossible to resist clicking multiple times when that happens, and > then they get multiple new cells all at once when it finally gets > unstuck. > > I could give you access to that server if you want to check it out > firsthand. > > -Marshall > > On May 29, 12:50 pm, William Stein wrote: >> 2009/5/29 Kiran Kedlaya : >> >> >> >> >> >>> On Apr 14, 3:47 pm, William Stein wrote: On Tue, Apr 14, 2009 at 12:30 PM, Kiran Kedlaya wrote: >> > I see 100% CPU usage when the notebook is processing a cell. I > don't > remember whether I still have it when a worksheet is open but > idle. >> > Kiran >> For the record, I definitely don't see that (I just checked now) and in fact I've never seen that on any OS/hardware combination ever. >> Could you make the above statement *precise*: - what OS/hardware? - what process(es) are 100% utilizing the CPU, exactly? (obviously at least one should be!) >> etc. >> -- William >> >>> I'm seeing this on a 64-bit Opteron box running Fedora 10. When I >>> run >>> top, I see a "python" process at 100% CPU. >> >> What is "this" precisely? Is it "I see 100% CPU usage when the >> notebook is processing a cell."? Since you *should* see 100% when >> Sage is doing a calculation. >> >> >> >>> Update: I'm now seeing this in every version of Sage that I've >>> tried, >>> back all the way to 3.0 and forward all the way to 4.0.rc1 (which >>> appears to fix some other memory issues on 64-bit Fedora 10). >> >>> Kiran >> >> -- >> William Stein >> Associate Professor of Mathematics >> University of Washingtonhttp://wstein.org > > --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Difference equations?
On Sat, May 30, 2009 at 10:50 PM, Alasdair wrote: > > You use solve_rec like this: > > maxima.load('solve_rec') > maxima('solve_rec(f[n+2]-3*f[n+1]+2*f[n]=2^n,f[n],f[0]=1,f[1]=0)') > Also, see http://maxima.sourceforge.net/docs/tutorial/en/gaertner-tutorial-revision/Pages/DiffEq0001.htm This might be related to http://trac.sagemath.org/sage_trac/ticket/1291 (which I found using google) but trac is down now so I can't be sure. > I think that solve_rec can in fact solve a larger class of difference > equations than linear equations with constant coefficients, but my > use doesn't involve anything more that this. > > -Alasdair > > On May 31, 11:22 am, Jason Grout wrote: >> Alasdair wrote: >> > I can solve a difference equation using the Maxima interface, and the >> > "solve_rec" package included with Maxima. Apparently SymPy can also >> > solve difference equations, but I can't find any documentation or >> > examples to show how this is done. So, two questions: >> >> > 1) How can difference equations be solved using SymPy, from within >> > Sage? >> > 2) Is it possible to write a little bit of code which will provide a >> > difference equation solver for Sage, using Maxima's solve_rec package >> > to perform the actual calculation? >> >> Can you give an example in maxima of using the solve_rec command? >> >> Jason > > > --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Difference equations?
You use solve_rec like this: maxima.load('solve_rec') maxima('solve_rec(f[n+2]-3*f[n+1]+2*f[n]=2^n,f[n],f[0]=1,f[1]=0)') I think that solve_rec can in fact solve a larger class of difference equations than linear equations with constant coefficients, but my use doesn't involve anything more that this. -Alasdair On May 31, 11:22 am, Jason Grout wrote: > Alasdair wrote: > > I can solve a difference equation using the Maxima interface, and the > > "solve_rec" package included with Maxima. Apparently SymPy can also > > solve difference equations, but I can't find any documentation or > > examples to show how this is done. So, two questions: > > > 1) How can difference equations be solved using SymPy, from within > > Sage? > > 2) Is it possible to write a little bit of code which will provide a > > difference equation solver for Sage, using Maxima's solve_rec package > > to perform the actual calculation? > > Can you give an example in maxima of using the solve_rec command? > > Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: 3dplotting complex functions
Ironically, I did something just like this at a talk this week. But I used something like lambda x,y: abs(zeta(x+i*y)) (actually not that, but I hope that will work). At least one of these should really be implemented as complexplot3d or something like that. Does that seem like a useful function to have around? - kcrisman On May 30, 9:13 pm, littlemathteacher wrote: > Thanks a lot. Much simpler than I thought it would be. Very fine > instructive example. > Yours, littlemathteacher. > > On 30 Mai, 17:49, Jason Grout wrote: > > > littlemathteacher wrote: > > > Dear Supporters, > > > > first of all thanks to you all for doing such a great support job to > > > me so far. > > > > Now I want to make complex analysis visible and to plot 3d-graphics > > > either of real or imaginary parts of functions. > > > > The first step would be to plot the exponential function just like in > > > the german or the us wikipedia article, later to show the branch cuts > > > like in > > > >http://mathworld.wolfram.com/BranchCut.html > > > > or the gamma function like in > > > >http://mathworld.wolfram.com/GammaFunction.html. > > > > The reason why my attemps fail might lie somwhere in the defining of > > > variables and in the picking out of the real or the imaginary part. > > > > I guess all I need is one working example of how to 3dplot let's say > > > complexplane X real part of the function value. > > > > Starting from that example I could do the rest myself, but I didn't > > > find one yet. > > > > Could you please post a link to an example? > > > And here's the imaginary part: > > > sage: plot3d(lambda x,y: arcsin(x+y*I).imag(), (-2,2), (-2,2)) > > > Jason > > -- > > Jason Grout --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Difference equations?
Alasdair wrote: > I can solve a difference equation using the Maxima interface, and the > "solve_rec" package included with Maxima. Apparently SymPy can also > solve difference equations, but I can't find any documentation or > examples to show how this is done. So, two questions: > > 1) How can difference equations be solved using SymPy, from within > Sage? > 2) Is it possible to write a little bit of code which will provide a > difference equation solver for Sage, using Maxima's solve_rec package > to perform the actual calculation? > Can you give an example in maxima of using the solve_rec command? Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: 3dplotting complex functions
Thanks a lot. Much simpler than I thought it would be. Very fine instructive example. Yours, littlemathteacher. On 30 Mai, 17:49, Jason Grout wrote: > littlemathteacher wrote: > > Dear Supporters, > > > first of all thanks to you all for doing such a great support job to > > me so far. > > > Now I want to make complex analysis visible and to plot 3d-graphics > > either of real or imaginary parts of functions. > > > The first step would be to plot the exponential function just like in > > the german or the us wikipedia article, later to show the branch cuts > > like in > > >http://mathworld.wolfram.com/BranchCut.html > > > or the gamma function like in > > >http://mathworld.wolfram.com/GammaFunction.html. > > > The reason why my attemps fail might lie somwhere in the defining of > > variables and in the picking out of the real or the imaginary part. > > > I guess all I need is one working example of how to 3dplot let's say > > complexplane X real part of the function value. > > > Starting from that example I could do the rest myself, but I didn't > > find one yet. > > > Could you please post a link to an example? > > And here's the imaginary part: > > sage: plot3d(lambda x,y: arcsin(x+y*I).imag(), (-2,2), (-2,2)) > > Jason > -- > Jason Grout --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Difference equations?
On Sat, May 30, 2009 at 5:13 PM, Alasdair wrote: > > I can solve a difference equation using the Maxima interface, and the > "solve_rec" package included with Maxima. Apparently SymPy can also > solve difference equations, but I can't find any documentation or > examples to show how this is done. So, two questions: > > 1) How can difference equations be solved using SymPy, from within > Sage? You might consider posting the above question to the sympy mailing list: http://groups.google.com/group/sympy > 2) Is it possible to write a little bit of code which will provide a > difference equation solver for Sage, using Maxima's solve_rec package > to perform the actual calculation? > > Thanks, > Alasdair > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Packages and Full installation
I'm just wondering about ordering the DVD. Does that come with all the additional packages (minus experimental)? This is a fairly trivial question, but I just want to install everything just to be able to show it off to my heavily pro-mathematica math department. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Difference equations?
I can solve a difference equation using the Maxima interface, and the "solve_rec" package included with Maxima. Apparently SymPy can also solve difference equations, but I can't find any documentation or examples to show how this is done. So, two questions: 1) How can difference equations be solved using SymPy, from within Sage? 2) Is it possible to write a little bit of code which will provide a difference equation solver for Sage, using Maxima's solve_rec package to perform the actual calculation? Thanks, Alasdair --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Citing Sage- 2nd try
On Sat, May 30, 2009 at 12:44 PM, avra wrote: > > Hi William, > > Thank you for the info. > > Would this be the appropriate way to incorporate everyone? That seems reasonable to me. William > > \newcommand{\etalchar}[1]{$^{#1}$} > \bibitem[S{\etalchar{+}}09]{sage} > W.\thinspace{}A. Stein et~al., \emph{{S}age {M}athematics {S}oftware > ({V}ersion > 3.3)}, The Sage~Development Team (specific package authors include: > William Stein, Robert Miller, Emily Kirkman, Robert Bradshaw, > Networkx), (2009), {\tt http://www.sagemath.org}. > > > Thank you > > Avra > > On May 23, 6:16 pm, William Stein wrote: >> On Sat, May 23, 2009 at 8:34 AM, avra wrote: >> >> > Hi Everyone, >> >> > I have included the previous messages from William and David Joyner, >> > but I am including the published worksheets links right away. I am >> > looking to properly credit and cite anyone who worked on the things >> > that I used. It is small and not complex, but I would credit people >> > where credit is due. >> >> >http://www.sagenb.org/home/pub/553/ >> >http://www.sagenb.org/home/pub/554/ >> >> The main people that come to mind when I look through your code is: >> >> * Robert Miller >> * Emily Kirkman >> * Robert Bradshaw >> * William Stein (me) >> * Networkx (the graph theory library backend that sage uses) >> >> William > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: using sphinx to create a manual
Hello, On Sat, May 30, 2009 at 3:27 PM, wrote: > I am sorry for my newbie question, but doesn't it seem natural that a > separate installation of Sphinx shouldn't be needed.? Is Sphinx not > included with Sage? He means a new Sphinx document. Something you'd get by running the sphinx-quickstart command. > Currently I have a similar aim: A Sage package with extensive > documentation, that I want to produce html reference pages of. Since I > am novice to Sphinx: > Can somebody please tell me what command I need to raise in order to > produce a html reference out of my package documentation? There are instructions after you run sphinx-quickstart. Sphinx can make makefiles that call the sphinx-build script which does most of the work. --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
#5371 will set better defaults, but only for a new server installation. For an existing notebook, to adjust the current save times on nb.sobj mimic the following session at the sage command line: sage: nb = load('/home/somebody/.sage/sage_notebook/nb.sobj', compress=False) sage: print nb.conf() Configuration: {'number_of_backups': 3, 'idle_timeout': 0, 'save_interval': 360, 'idle_check_interval': 360} sage: nb.conf()['save_interval']=int(900) #15 minutes sage: print nb.conf() Configuration: {'number_of_backups': 3, 'idle_timeout': 0, 'save_interval': 900, 'idle_check_interval': 360} sage: nb.save() Use the script at #5880 to clean out massive numbers of saved worksheets. Apply the patch to reduce the actions that lead to a worksheet saves. Apply #5895 if you want to permanently cap snapshots to 30 per worksheet, with amnesty for worksheets created before May 1, 2009. Rob --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: using sphinx to create a manual
Dear David, On 30 Mai, 23:51, davidp wrote: > I am writing a manual for a Sage package I am developing. It seems > natural to use Sphinx/reST. I am sorry for my newbie question, but doesn't it seem natural that a separate installation of Sphinx shouldn't be needed.? Is Sphinx not included with Sage? Currently I have a similar aim: A Sage package with extensive documentation, that I want to produce html reference pages of. Since I am novice to Sphinx: Can somebody please tell me what command I need to raise in order to produce a html reference out of my package documentation? Cheers, Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: multivariate polynomial rings and symmetric functions
Hi! On 30 Mai, 14:16, simon.k...@uni-jena.de wrote: ... > sage: R._has_coerce_map_from(R) > > --- > TypeError Traceback (most recent > call last) > > /home/SimonKing/.sage/temp/sage.math.washington.edu /5548/ > _home_SimonKing__sage_init_sage_0.py in () > > TypeError: 'dict' object is not callable Meanwhile I really wonder how this bug, that also exists in Sage 4.0, does *not* break many doc tests. I think a method such as _has_coerce_map_from should return True or False, but must not raise an error. And of course, any ring has a coercion map to itself, namely the identity. So, the answer should be True and not TypeError. I made it ticket #6161, a blocker. I had no time yet to look into the sources and produce a patch, though. Best regards, Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
Rob points out that some other tickets are pertinent too, notably #5371. Following the instructions there made my notebook usable again (while Gonzalo's script is still running). He also mentioned #5895, which I'm going to go look at now. Thanks! Kiran On May 30, 5:24 pm, Kiran Kedlaya wrote: > Followup: I think the underlying issue here was addressed in ticket > #5880. My problem was that I had a lot of old snapshots created by > pre-3.4.1 versions of sage, and they were tying the file system in > knots. I'm now running the script Gonzalo posted to #5880 that deletes > redundant snapshots; that should help. Marshall: might that help in > your case too? > > Kiran > > On May 30, 2:47 pm, Kiran Kedlaya wrote: > > > > > I just tried a test with 3.4.1, and I was seeing 100% CPU usage (and > > > > impressive memory usage) even when the notebook was idle. This is a > > > > Fedora 64 system, so I also tried using a patched 4.0.rc1 that > > > > upgraded python to 2.5.4 (since that fixed other memory issues); that > > > > way, I don't see any CPU usage on idle, but when I try to evaluate 2+2 > > > > I get 90+% CPU usage for 10+ seconds > > > > Does that happen *every* time, or just the first time? > > > . > > > Every time. > > > > > It also takes much longer to start and stop the notebook on this > > > > system than, say, on sage.math (20+ seconds versus maybe 2 seconds), > > > > out of proportion to the CPU speeds of the machines. > > > > Maybe your filesystem is slow? Are you using nfs? > > > The Sage install is on a local file system, but the sage_notebook > > directory is on nfs. If I force the notebook directory to be on the > > local file system, this doesn't seem to happen. > > > I suppose that means that I can get around this by moving the notebook > > directory. But it might be nice if there were another alternative in > > case someone doesn't have that option (i.e., some way to run the > > notebook with fewer file accesses). > > > Thanks! > > Kiran --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: using sphinx to create a manual
I guess I figured it out. In the conf.py file: # The reST default role (used for this markup: `text`) to use for all documents. default_role = 'math' --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] using sphinx to create a manual
I am writing a manual for a Sage package I am developing. It seems natural to use Sphinx/reST. I made an independent installation of Sphinx and eventually realized that to typeset mathematics, I need to write, for example, :math:`\Gamma` instead of Sage's cleaner version: ` \Gamma`. The latter is obviously preferable (and $'s would be even better, of course). Any suggestions? Thanks, Dave --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
Followup: I think the underlying issue here was addressed in ticket #5880. My problem was that I had a lot of old snapshots created by pre-3.4.1 versions of sage, and they were tying the file system in knots. I'm now running the script Gonzalo posted to #5880 that deletes redundant snapshots; that should help. Marshall: might that help in your case too? Kiran On May 30, 2:47 pm, Kiran Kedlaya wrote: > > > I just tried a test with 3.4.1, and I was seeing 100% CPU usage (and > > > impressive memory usage) even when the notebook was idle. This is a > > > Fedora 64 system, so I also tried using a patched 4.0.rc1 that > > > upgraded python to 2.5.4 (since that fixed other memory issues); that > > > way, I don't see any CPU usage on idle, but when I try to evaluate 2+2 > > > I get 90+% CPU usage for 10+ seconds > > > Does that happen *every* time, or just the first time? > > . > > Every time. > > > > > > It also takes much longer to start and stop the notebook on this > > > system than, say, on sage.math (20+ seconds versus maybe 2 seconds), > > > out of proportion to the CPU speeds of the machines. > > > Maybe your filesystem is slow? Are you using nfs? > > The Sage install is on a local file system, but the sage_notebook > directory is on nfs. If I force the notebook directory to be on the > local file system, this doesn't seem to happen. > > I suppose that means that I can get around this by moving the notebook > directory. But it might be nice if there were another alternative in > case someone doesn't have that option (i.e., some way to run the > notebook with fewer file accesses). > > Thanks! > Kiran --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
I experienced similar symptoms a while back. The notebook frequently backs up individual worksheets in a "snapshots" directory and you may have millions of them, but I don't think this was the root of the problem. There is also a .sage/sage_notebook/nb.sobj file that gets backed-up regularly (every 30 seconds, every new cell) into a backups subdirectory alongside the original file. My "personal" version of this file is 30 MB and is run off an external drive, so I noticed delays. I don't think I ever checked CPU usage relative to this effect. William is aware of this, I believe, so maybe he has a reason to believe this is not the explanation here. You can set the delay time on this (mine is now 20 minutes or an hour) and then for me the symptoms went away. At the command line, you need to instantiate a notebook object, set the right attribute and then save it, or something like that. Read the docstring on the patch at: http://trac.sagemath.org/sage_trac/ticket/5371 for a detailed how-to. More hints are at http://trac.sagemath.org/sage_trac/ticket/5459 and there are other relevant trac tickets. The various save intervals have names that are somewhat confusing - hopefully this all gets reorganized in the next overhaul of the notebook. Rob --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Citing Sage- 2nd try
Hi William, Thank you for the info. Would this be the appropriate way to incorporate everyone? \newcommand{\etalchar}[1]{$^{#1}$} \bibitem[S{\etalchar{+}}09]{sage} W.\thinspace{}A. Stein et~al., \emph{{S}age {M}athematics {S}oftware ({V}ersion 3.3)}, The Sage~Development Team (specific package authors include: William Stein, Robert Miller, Emily Kirkman, Robert Bradshaw, Networkx), (2009), {\tt http://www.sagemath.org}. Thank you Avra On May 23, 6:16 pm, William Stein wrote: > On Sat, May 23, 2009 at 8:34 AM, avra wrote: > > > Hi Everyone, > > > I have included the previous messages from William and David Joyner, > > but I am including the published worksheets links right away. I am > > looking to properly credit and cite anyone who worked on the things > > that I used. It is small and not complex, but I would credit people > > where credit is due. > > >http://www.sagenb.org/home/pub/553/ > >http://www.sagenb.org/home/pub/554/ > > The main people that come to mind when I look through your code is: > > * Robert Miller > * Emily Kirkman > * Robert Bradshaw > * William Stein (me) > * Networkx (the graph theory library backend that sage uses) > > William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: multivariate polynomial rings and symmetric functions
sure, i think it is a bit weird as well. It certainly has behaviour that is unexpected. I think this will cause a lot of confusion, so I think openning a ticket is a good idea. As for multiplying those two polynomials, it seems that what you have said works. I will give it a try. Cheers On 30 May, 13:16, simon.k...@uni-jena.de wrote: > Hi! > > A little addendum: > > > For a similar reason, neither f nor g are elements of R. > > I would agree that it is a little confusing that something is equal to > an element of a polynomial ring but is not an element of that ring, or > in pure form: > sage: R = QQ['x','y'] > sage: R1.=QQ[] > sage: R2.=QQ[] > sage: x in R > False > sage: x == R.gen(0) > True > > This is at least inconsistent, because for rational numbers that > happen to be integers, the containment is answered in a different way: > sage: (1/1).parent() > Rational Field > sage: (1/1).parent() == ZZ > False > sage: 1/1 in ZZ > True > > So, although 1/1 is given as an element of the rationals, it is > recognized as an element of the integers. > > But why is the generator x of a univariate polynomial ring not > recognized as an element of a bivariate polynomial ring in x and y? > > Question to the developers: Is this perhaps due to the following (a > bug in the coercion system?): > sage: R._has_coerce_map_from(R) > > --- > TypeError Traceback (most recent > call last) > > /home/SimonKing/.sage/temp/sage.math.washington.edu /5548/ > _home_SimonKing__sage_init_sage_0.py in () > > TypeError: 'dict' object is not callable > > This happens on sage.math with sage-3.4.2. Shall I open a ticket? > > Cheers, > Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage with tkinter (or some graphics backend?) on Mac OS X
Adam, according to the FAQ No. 3.9: "It may be that you have Tcl/Tk installed and that your system's python recognizes it, but Sage's python does not, To fix that, install the tcl/tk development library (something like tk8.5-dev)." Then, you can test if this is the case giving: sage: import _tkinter sage: import Tkinter if it does not complain your SAGE's python recognizes it. If it does, you need to reinstall your SAGE's Python: sage -f python-2.5.2.p9 and make the test again. sage: import _tkinter sage: import Tkinter. It should work now. Regards, Jorge > Date: Sat, 30 May 2009 10:04:41 -0700 > Subject: [sage-support] Re: sage with tkinter (or some graphics backend?) on > Mac OS X > From: keflav...@gmail.com > To: sage-support@googlegroups.com > > > Here's what I tried: > > download tcl8.5.7-src.tar.gz and tk8.5.7-src.tar.gz from > http://www.tcl.tk/software/tcltk/download.html > run ./configure --enable-framework --disable-xft in the unix/ > subdirectory of tcl, then make & make install as normal > run ./configure --enable-framework --disable-xft in the unix/ > subdirectory of tk, then make & make install as normal > /Applications/sage/sage -sh > cd /Applications/sage/spkg/standard/python-2.5.2.p9/src/ > [edit setup.py as suggested at http://trac.sagemath.org/sage_trac/ticket/4970] > ./spkg-install > > ERROR: > /usr/bin/install -c -m 644 ./Misc/python.man \ > /Applications/sage/local/share/man/man1/python.1 > Copying 64 bit OSX specific pymactoolbox.h > Sleeping for three seconds before testing python > Traceback (most recent call last): > File "", line 1, in > File "/Applications/sage/local/lib/python2.5/md5.py", line 6, in > > from hashlib import md5 > File "/Applications/sage/local/lib/python2.5/hashlib.py", line 133, > in > md5 = __get_builtin_constructor('md5') > File "/Applications/sage/local/lib/python2.5/hashlib.py", line 60, > in __get_builtin_constructor > import _md5 > ImportError: No module named _md5 > md5 module failed to import > > OK, that failed, trying something different... > Download tcltk from: http://nullhomotopie.de/tcltk8.5.7.spkg (as per > instructions on http://wiki.sagemath.org/Yacop) > > ./sage -f spkg/optional/tcltk8.5.7.spkg spkg/standard/ > matplotlib-0.98.5.3rc0-svn6910.p3 spkg/standard/python-2.5.2.p9 > > Then try to import _tkinter: > /Applications/sage$ ./sage -c "import _tkinter" > Traceback (most recent call last): > File "/Applications/sage/local/bin/sage-eval", line 14, in > eval(compile(s,'','exec')) > File "", line 1, in > ImportError: No module named _tkinter > > So I'm still stuck. Any ideas? > > Thanks, > Adam > > _ Windows Live te ayuda a mantenerte en contacto con todos tus amigos en un solo sitio. http://www.microsoft.com/mexico/windows/windowslive/products/social-network-connector.aspx --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
> > I just tried a test with 3.4.1, and I was seeing 100% CPU usage (and > > impressive memory usage) even when the notebook was idle. This is a > > Fedora 64 system, so I also tried using a patched 4.0.rc1 that > > upgraded python to 2.5.4 (since that fixed other memory issues); that > > way, I don't see any CPU usage on idle, but when I try to evaluate 2+2 > > I get 90+% CPU usage for 10+ seconds > > Does that happen *every* time, or just the first time? > . Every time. > > > > > It also takes much longer to start and stop the notebook on this > > system than, say, on sage.math (20+ seconds versus maybe 2 seconds), > > out of proportion to the CPU speeds of the machines. > > Maybe your filesystem is slow? Are you using nfs? > The Sage install is on a local file system, but the sage_notebook directory is on nfs. If I force the notebook directory to be on the local file system, this doesn't seem to happen. I suppose that means that I can get around this by moving the notebook directory. But it might be nice if there were another alternative in case someone doesn't have that option (i.e., some way to run the notebook with fewer file accesses). Thanks! Kiran --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Can I write a sage program and run it from command line?
Dear Laurent, I think the idea is that Sage is "with batteries included" and should not interfere with anything that you have on your system. Namely, since Sage is rather big, it is very probable that Sage ships something that is already installed on your computer -- in your case, Python. So, either the installation of Sage would nuke your Python (I guess you wouldn't be happy about it...), or during installation, Sage should try to find things on your system and try to use them. AFAIK, that would frankly be impossible, in such a complicated system. On the dark side, you need to re-install all your Python packages. On the bright side, it shouldn't be difficult. Sage also provides its own shell, that you can obtain by the command sage -sh In the Sage shell, the PATH points to the things that were installed by Sage. Hence, when you run Python inside the Sage shell, then it is Sage's Python. Start the Sage shell, install a Python package, and quit the Sage shell, then afterwards you should be able to use the package in Sage. Best regards, Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Can I write a sage program and run it from command line?
>> I've tried to import both sage and pygtk without success, both in >> python and sage console. Please tell me if you can achieve this. I >> guess you have to install the module within sage, even if it is >> installed in the system, but outside sage. >> The same here : #! /usr/bin/sage -python # -*- coding: utf8 -*- from sage.all import * import sys# sys n'est utilisé que pour la partie Qt. from PyQt4 import QtCore, QtGui produces : Traceback (most recent call last): File "./sagess.py", line 6, in from PyQt4 import QtCore, QtGui ImportError: No module named PyQt4 ... well. Good to know. Laurent --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: sage with tkinter (or some graphics backend?) on Mac OS X
Here's what I tried: download tcl8.5.7-src.tar.gz and tk8.5.7-src.tar.gz from http://www.tcl.tk/software/tcltk/download.html run ./configure --enable-framework --disable-xft in the unix/ subdirectory of tcl, then make & make install as normal run ./configure --enable-framework --disable-xft in the unix/ subdirectory of tk, then make & make install as normal /Applications/sage/sage -sh cd /Applications/sage/spkg/standard/python-2.5.2.p9/src/ [edit setup.py as suggested at http://trac.sagemath.org/sage_trac/ticket/4970] ./spkg-install ERROR: /usr/bin/install -c -m 644 ./Misc/python.man \ /Applications/sage/local/share/man/man1/python.1 Copying 64 bit OSX specific pymactoolbox.h Sleeping for three seconds before testing python Traceback (most recent call last): File "", line 1, in File "/Applications/sage/local/lib/python2.5/md5.py", line 6, in from hashlib import md5 File "/Applications/sage/local/lib/python2.5/hashlib.py", line 133, in md5 = __get_builtin_constructor('md5') File "/Applications/sage/local/lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor import _md5 ImportError: No module named _md5 md5 module failed to import OK, that failed, trying something different... Download tcltk from: http://nullhomotopie.de/tcltk8.5.7.spkg (as per instructions on http://wiki.sagemath.org/Yacop) ./sage -f spkg/optional/tcltk8.5.7.spkg spkg/standard/ matplotlib-0.98.5.3rc0-svn6910.p3 spkg/standard/python-2.5.2.p9 Then try to import _tkinter: /Applications/sage$ ./sage -c "import _tkinter" Traceback (most recent call last): File "/Applications/sage/local/bin/sage-eval", line 14, in eval(compile(s,'','exec')) File "", line 1, in ImportError: No module named _tkinter So I'm still stuck. Any ideas? Thanks, Adam --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Can I write a sage program and run it from command line?
On Sat, May 30, 2009 at 11:10, pang wrote: > > > In the case where I'm using the test.sage trick, can I still import my > > own modules > > or have access to everything ? > > I guess the answer is Yes, isn't ? > > > I've tried to import both sage and pygtk without success, both in > python and sage console. Please tell me if you can achieve this. I > guess you have to install the module within sage, even if it is > installed in the system, but outside sage. > One option that I have used is to put *.pth files inside SAGE_ROOT/local/lib/python/site-packages/ Each line in the *.pth file is the path to a directory that will be added to the search path for python modules. See SAGE_ROOT/local/lib/python/site.py for more info. Another option is to manually add python module search directories on the fly, by importing the sys module, and appending them to sys.path. For example, if you were working with a remote sage server, and you did not have access to the file system to install modules, you could upload a module to the DATA directory of a worksheet, then do: import sys sys.path.append(DATA) import your_module -- Kevin Horton Ottawa, Canada --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: 3dplotting complex functions
littlemathteacher wrote: > Dear Supporters, > > first of all thanks to you all for doing such a great support job to > me so far. > > Now I want to make complex analysis visible and to plot 3d-graphics > either of real or imaginary parts of functions. > > The first step would be to plot the exponential function just like in > the german or the us wikipedia article, later to show the branch cuts > like in > > http://mathworld.wolfram.com/BranchCut.html > > or the gamma function like in > > http://mathworld.wolfram.com/GammaFunction.html . > > The reason why my attemps fail might lie somwhere in the defining of > variables and in the picking out of the real or the imaginary part. > > I guess all I need is one working example of how to 3dplot let's say > complexplane X real part of the function value. > > Starting from that example I could do the rest myself, but I didn't > find one yet. > > Could you please post a link to an example? > And here's the imaginary part: sage: plot3d(lambda x,y: arcsin(x+y*I).imag(), (-2,2), (-2,2)) Jason -- Jason Grout --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: 3dplotting complex functions
littlemathteacher wrote: > Dear Supporters, > > first of all thanks to you all for doing such a great support job to > me so far. > > Now I want to make complex analysis visible and to plot 3d-graphics > either of real or imaginary parts of functions. > > The first step would be to plot the exponential function just like in > the german or the us wikipedia article, later to show the branch cuts > like in > > http://mathworld.wolfram.com/BranchCut.html > > or the gamma function like in > > http://mathworld.wolfram.com/GammaFunction.html . > > The reason why my attemps fail might lie somwhere in the defining of > variables and in the picking out of the real or the imaginary part. > > I guess all I need is one working example of how to 3dplot let's say > complexplane X real part of the function value. > > Starting from that example I could do the rest myself, but I didn't > find one yet. > > Could you please post a link to an example? > Here is a solution: sage: plot3d(lambda x,y: arcsin(x+y*I).real(), (-2,2), (-2,2)) or: sage: def f(x,y): : return arcsin(x+y*I).real() : sage: plot3d(f, (-2,2), (-2,2)) Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Can I write a sage program and run it from command line?
On May 30, 2009, at 11:10 AM, pang wrote: > I've tried to import both sage and pygtk without success, both in > python and sage console. Please tell me if you can achieve this. I > guess you have to install the module within sage, even if it is > installed in the system, but outside sage. > Sage only knows about python modules installed within its python installation so any other python modules you want to use with it have to be installed there. Cheers, Tim. --- Tim Lahey PhD Candidate, Systems Design Engineering University of Waterloo http://www.linkedin.com/in/timlahey --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Can I write a sage program and run it from command line?
> In the case where I'm using the test.sage trick, can I still import my > own modules > or have access to everything ? > I guess the answer is Yes, isn't ? > I've tried to import both sage and pygtk without success, both in python and sage console. Please tell me if you can achieve this. I guess you have to install the module within sage, even if it is installed in the system, but outside sage. Regards --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: build failure on andLinux / Ubuntu
On May 30, 12:30 am, William Stein wrote: > On Fri, May 29, 2009 at 7:03 PM, gary wrote: > > > I'm running Ubuntu 9.04 in andLinux > > (http://www.andlinux.org) > > a linux kernel that runs on MS Windows. Up to now, it's behaved just > > like any other Ubuntu. > > > I've compiled sage on other Ubuntus, including an Ubuntu-only machine, > > and in a Ubuntu guest on a WinXP host using VirtualBox. Never had a > > problem. Until now. > > > I've downloaded 3.4.2, unpacked it, cd to the directory, and then: > > What is the output of "df -h" in andLinux? The default Ubuntu > andLinux install doesn't have enough disk space to extract the sage > binary. I have only been able to extract it by pausing it (with > control-z) during extraction, deleting files I (secretely) know aren't > strictly needed, then resuming the extraction. I'm sure there must be > some better official way to make the andLinux partition bigger than > 2GB though. Indeed there is, and I had already done that, increasing my filesystem to 5GB. g...@andlinux:~$ df -h FilesystemSize Used Avail Use% Mounted on /dev/cobd05.0G 1.4G 3.4G 29% / tmpfs 189M 0 189M 0% /lib/init/rw varrun189M 60K 189M 1% /var/run varlock 189M 0 189M 0% /var/lock udev 189M 228K 189M 1% /dev tmpfs 189M 0 189M 0% /dev/shm 31 21G 19G 1.7G 92% /mnt/and /dev/cofs0 53G 47G 6.1G 89% /mnt/win g...@andlinux:~$ > > William > > > > > > > g...@andlinux:~/sage-3.4.2$ make > > cd spkg && ./install all 2>&1 | tee -a ../install.log > > ./install: 355: time: not found > > ** > > You must compile Sage first using 'make' in the Sage root directory. > > (If you have already compiled Sage, you must set the SAGE_ROOT > > variable in > > the file '/home/gap/sage-3.4.2/sage'). > > ** > > > This must be something simple. > > Help please? > > > -gary > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
On Sat, May 30, 2009 at 7:21 AM, Kiran Kedlaya wrote: > > > > On May 29, 1:50 pm, William Stein wrote: >> 2009/5/29 Kiran Kedlaya : >> >> >> >> >> >> > On Apr 14, 3:47 pm, William Stein wrote: >> >> On Tue, Apr 14, 2009 at 12:30 PM, Kiran Kedlaya wrote: >> >> >> > I see 100% CPU usage when the notebook is processing a cell. I don't >> >> > remember whether I still have it when a worksheet is open but idle. >> >> >> > Kiran >> >> >> For the record, I definitely don't see that (I just checked now) and >> >> in fact I've never seen that on any OS/hardware combination ever. >> >> >> Could you make the above statement *precise*: >> >> - what OS/hardware? >> >> - what process(es) are 100% utilizing the CPU, exactly? (obviously >> >> at least one should be!) >> >> >> etc. >> >> >> -- William >> >> > I'm seeing this on a 64-bit Opteron box running Fedora 10. When I run >> > top, I see a "python" process at 100% CPU. >> >> What is "this" precisely? Is it "I see 100% CPU usage when the >> notebook is processing a cell."? Since you *should* see 100% when >> Sage is doing a calculation. >> >> > I just tried a test with 3.4.1, and I was seeing 100% CPU usage (and > impressive memory usage) even when the notebook was idle. This is a > Fedora 64 system, so I also tried using a patched 4.0.rc1 that > upgraded python to 2.5.4 (since that fixed other memory issues); that > way, I don't see any CPU usage on idle, but when I try to evaluate 2+2 > I get 90+% CPU usage for 10+ seconds Does that happen *every* time, or just the first time? . > > It also takes much longer to start and stop the notebook on this > system than, say, on sage.math (20+ seconds versus maybe 2 seconds), > out of proportion to the CPU speeds of the machines. Maybe your filesystem is slow? Are you using nfs? William > > In case it helps, I tried prun on the notebook and got this back: > > ncalls tottime percall cumtime percall filename:lineno > (function) > 1 153.810 153.810 153.810 153.810 {posix.system} > 1 25.122 25.122 25.128 25.128 {cPickle.dumps} > 1 1.977 1.977 1.980 1.980 notebook.py:2278 > (load_notebook) > 1 0.468 0.468 26.302 26.302 notebook.py:1643(save) > 3 0.418 0.139 0.418 0.139 {method 'close' of > 'file' objects} > 1 0.156 0.156 182.257 182.257 run_notebook.py:49 > (notebook_twisted) > 1853 0.124 0.000 0.124 0.000 {method 'write' of > 'file' objects} > 1852 0.083 0.000 0.083 0.000 {method 'read' of 'file' > objects} > 4 0.030 0.007 0.030 0.007 {open} > 1 0.023 0.023 0.187 0.187 shutil.py:23 > (copyfileobj) > 1 0.016 0.016 0.016 0.016 {posix.chmod} > 2 0.014 0.007 0.014 0.007 {posix.rename} > 72 0.003 0.000 0.006 0.000 worksheet.py:1932 > (__getstate__) > 72 0.003 0.000 0.003 0.000 worksheet.py:1990 > (__setstate__) > > (et cetera) > > Kiran > > > -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Notebook server sluggish in 3.4
On May 29, 1:50 pm, William Stein wrote: > 2009/5/29 Kiran Kedlaya : > > > > > > > On Apr 14, 3:47 pm, William Stein wrote: > >> On Tue, Apr 14, 2009 at 12:30 PM, Kiran Kedlaya wrote: > > >> > I see 100% CPU usage when the notebook is processing a cell. I don't > >> > remember whether I still have it when a worksheet is open but idle. > > >> > Kiran > > >> For the record, I definitely don't see that (I just checked now) and > >> in fact I've never seen that on any OS/hardware combination ever. > > >> Could you make the above statement *precise*: > >> - what OS/hardware? > >> - what process(es) are 100% utilizing the CPU, exactly? (obviously > >> at least one should be!) > > >> etc. > > >> -- William > > > I'm seeing this on a 64-bit Opteron box running Fedora 10. When I run > > top, I see a "python" process at 100% CPU. > > What is "this" precisely? Is it "I see 100% CPU usage when the > notebook is processing a cell."? Since you *should* see 100% when > Sage is doing a calculation. > > I just tried a test with 3.4.1, and I was seeing 100% CPU usage (and impressive memory usage) even when the notebook was idle. This is a Fedora 64 system, so I also tried using a patched 4.0.rc1 that upgraded python to 2.5.4 (since that fixed other memory issues); that way, I don't see any CPU usage on idle, but when I try to evaluate 2+2 I get 90+% CPU usage for 10+ seconds. It also takes much longer to start and stop the notebook on this system than, say, on sage.math (20+ seconds versus maybe 2 seconds), out of proportion to the CPU speeds of the machines. In case it helps, I tried prun on the notebook and got this back: ncalls tottime percall cumtime percall filename:lineno (function) 1 153.810 153.810 153.810 153.810 {posix.system} 1 25.122 25.122 25.128 25.128 {cPickle.dumps} 11.9771.9771.9801.980 notebook.py:2278 (load_notebook) 10.4680.468 26.302 26.302 notebook.py:1643(save) 30.4180.1390.4180.139 {method 'close' of 'file' objects} 10.1560.156 182.257 182.257 run_notebook.py:49 (notebook_twisted) 18530.1240.0000.1240.000 {method 'write' of 'file' objects} 18520.0830.0000.0830.000 {method 'read' of 'file' objects} 40.0300.0070.0300.007 {open} 10.0230.0230.1870.187 shutil.py:23 (copyfileobj) 10.0160.0160.0160.016 {posix.chmod} 20.0140.0070.0140.007 {posix.rename} 720.0030.0000.0060.000 worksheet.py:1932 (__getstate__) 720.0030.0000.0030.000 worksheet.py:1990 (__setstate__) (et cetera) Kiran --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] 3dplotting complex functions
Dear Supporters, first of all thanks to you all for doing such a great support job to me so far. Now I want to make complex analysis visible and to plot 3d-graphics either of real or imaginary parts of functions. The first step would be to plot the exponential function just like in the german or the us wikipedia article, later to show the branch cuts like in http://mathworld.wolfram.com/BranchCut.html or the gamma function like in http://mathworld.wolfram.com/GammaFunction.html . The reason why my attemps fail might lie somwhere in the defining of variables and in the picking out of the real or the imaginary part. I guess all I need is one working example of how to 3dplot let's say complexplane X real part of the function value. Starting from that example I could do the rest myself, but I didn't find one yet. Could you please post a link to an example? Thanks a lot. Yours, littlemathteacher --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: multivariate polynomial rings and symmetric functions
Hi! A little addendum: > For a similar reason, neither f nor g are elements of R. I would agree that it is a little confusing that something is equal to an element of a polynomial ring but is not an element of that ring, or in pure form: sage: R = QQ['x','y'] sage: R1.=QQ[] sage: R2.=QQ[] sage: x in R False sage: x == R.gen(0) True This is at least inconsistent, because for rational numbers that happen to be integers, the containment is answered in a different way: sage: (1/1).parent() Rational Field sage: (1/1).parent() == ZZ False sage: 1/1 in ZZ True So, although 1/1 is given as an element of the rationals, it is recognized as an element of the integers. But why is the generator x of a univariate polynomial ring not recognized as an element of a bivariate polynomial ring in x and y? Question to the developers: Is this perhaps due to the following (a bug in the coercion system?): sage: R._has_coerce_map_from(R) --- TypeError Traceback (most recent call last) /home/SimonKing/.sage/temp/sage.math.washington.edu /5548/ _home_SimonKing__sage_init_sage_0.py in () TypeError: 'dict' object is not callable This happens on sage.math with sage-3.4.2. Shall I open a ticket? Cheers, Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: multivariate polynomial rings and symmetric functions
Hi! On 30 Mai, 12:47, amps wrote: ... > TypeError: unsupported operand parent(s) for '*': 'Multivariate > Polynomial Ring in z0 over Rational Field' and 'Multivariate > Polynomial Ring in z1 over Rational Field' > sage: > > > Basically, I want to be able to multiply f and g and I can't, probably > because they are not recognized as being in the same polynomial ring. They are *not* in the same polynomial ring. Continuing your example: sage: g.parent() Multivariate Polynomial Ring in z1 over Rational Field sage: f.parent() Multivariate Polynomial Ring in z0 over Rational Field Hence, f and g live in polynomial rings that are isomorphic but that are certainly not the same: sage: g.parent() == f.parent() False For a similar reason, neither f nor g are elements of R. However, it is possible to convert both f and g into elements of R, and then you can multiply: sage: R(f)*R(g) z0^3*z1^3 Best regards Simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: multivariate polynomial rings and symmetric functions
Sorry to reply to myself, here is what I really want to do. continuing my last post I will put the entire code again). sage: R=PolynomialRing(QQ,2,'z') sage: z=R.gens() sage: x=tuple([z[0]]) sage: p=SFAPower(QQ) sage: f=p([2,1]).expand(1,alphabet=x) sage: f z0^3 sage: f in R False sage: f==z[0]^3 True sage: z[0]^3 in R True sage: y=tuple([z[1]]) sage: g=p([2,1]).expand(1,alphabet=y) sage: g z1^3 sage: f*g --- TypeError Traceback (most recent call last) /home/arattan/Sage/ in () /usr/local/sage-3.4/local/lib/python2.5/site-packages/sage/structure/ element.so in sage.structure.element.RingElement.__mul__ (sage/ structure/element.c:9813)() /usr/local/sage-3.4/local/lib/python2.5/site-packages/sage/structure/ coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:6584)() TypeError: unsupported operand parent(s) for '*': 'Multivariate Polynomial Ring in z0 over Rational Field' and 'Multivariate Polynomial Ring in z1 over Rational Field' sage: Basically, I want to be able to multiply f and g and I can't, probably because they are not recognized as being in the same polynomial ring. On 30 May, 11:30, amps wrote: > Hello, > > I am wondering how to coerce a symmetric function in a certain number > of variables into a polynomial ring with larger variables. I am > getting some rather confusing output. > > -- > | Sage Version 3.4.2, Release Date: 2009-05-05 | > | Type notebook() for the GUI, and license() for information. | > -- > sage: R=PolynomialRing(QQ,2,'z') > sage: z=R.gens() > sage: x=tuple([z[0]]) > sage: x > (z0,) > sage: p=SFAPower(QQ) > sage: f=p([2,1]).expand(1,alphabet=x) > sage: f in R > False > sage: f > z0^3 > sage: f==z[0]^3 > True > sage: z[0]^3 in R > True > sage: > > > > as you can see, f seems to be both in and not in R. I want the > polynomial to be a symmetric polynomial in a subset of variables in > the ring R. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] multivariate polynomial rings and symmetric functions
Hello, I am wondering how to coerce a symmetric function in a certain number of variables into a polynomial ring with larger variables. I am getting some rather confusing output. -- | Sage Version 3.4.2, Release Date: 2009-05-05 | | Type notebook() for the GUI, and license() for information.| -- sage: R=PolynomialRing(QQ,2,'z') sage: z=R.gens() sage: x=tuple([z[0]]) sage: x (z0,) sage: p=SFAPower(QQ) sage: f=p([2,1]).expand(1,alphabet=x) sage: f in R False sage: f z0^3 sage: f==z[0]^3 True sage: z[0]^3 in R True sage: as you can see, f seems to be both in and not in R. I want the polynomial to be a symmetric polynomial in a subset of variables in the ring R. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---