[sage-support] Re: Sage Reference Manual as PDF
On Fri, Oct 17, 2008 at 1:35 PM, Alain Birtz [EMAIL PROTECTED] wrote: Where can I get Sage Reference Manual in PDF format ? I need to view the manual offline and the link http://www.sagemath.org/doc/ref/index.html is for online only. Thank you. Here: http://www.sagemath.org/help.html --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] no plotting
I am preparing the course for next week, but: sage: plot(sin x, (-1,1)) File ipython console, line 1 plot(sin x, (-Integer(1),Integer(1))) ^ SyntaxError: invalid syntax sage: plot(sin(x), (-1,1)) --- AttributeErrorTraceback (most recent call last) /home/martin/sage-3.1.1/ipython console in module() /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/IPython/Prompts.py in __call__(self, arg) 533 534 # and now call a possibly user-defined print mechanism -- 535 manipulated_val = self.display(arg) 536 537 # user display hooks can change the variable to be stored in /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/IPython/Prompts.py in _display(self, arg) 559 return IPython.generics.result_display(arg) 560 except TryNext: -- 561 return self.shell.hooks.result_display(arg) 562 563 # Assign the default display method: /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/IPython/hooks.py in __call__(self, *args, **kw) 132 #print prio,prio,cmd,cmd #dbg 133 try: -- 134 ret = cmd(*args, **kw) 135 return ret 136 except ipapi.TryNext, exc: /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/IPython/hooks.py in result_display(self, arg) 160 161 if self.rc.pprint: -- 162 out = pformat(arg) 163 if '\n' in out: 164 # So that multi-line strings line up with the left column of /home/martin/sage-3.1.1/local/lib/python2.5/pprint.py in pformat(self, object) 109 def pformat(self, object): 110 sio = _StringIO() -- 111 self._format(object, sio, 0, 0, {}, 0) 112 return sio.getvalue() 113 /home/martin/sage-3.1.1/local/lib/python2.5/pprint.py in _format(self, object, stream, indent, allowance, context, level) 127 self._readable = False 128 return -- 129 rep = self._repr(object, context, level - 1) 130 typ = _type(object) 131 sepLines = _len(rep) (self._width - 1 - indent - allowance) /home/martin/sage-3.1.1/local/lib/python2.5/pprint.py in _repr(self, object, context, level) 193 def _repr(self, object, context, level): 194 repr, readable, recursive = self.format(object, context.copy(), -- 195 self._depth, level) 196 if not readable: 197 self._readable = False /home/martin/sage-3.1.1/local/lib/python2.5/pprint.py in format(self, object, context, maxlevels, level) 205 and whether the object represents a recursive construct. 206 -- 207 return _safe_repr(object, context, maxlevels, level) 208 209 /home/martin/sage-3.1.1/local/lib/python2.5/pprint.py in _safe_repr(object, context, maxlevels, level) 290 return format % _commajoin(components), readable, recursive 291 -- 292 rep = repr(object) 293 return rep, (rep and not rep.startswith('')), False 294 /home/martin/sage-3.1.1/sage_object.pyx in sage.structure.sage_object.SageObject.__repr__ (sage/structure/sage_object.c:795)() /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/sage/plot/plot.py in _repr_(self) 739 740 if SHOW_DEFAULT: -- 741 self.show() 742 return '' 743 else: /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/sage/plot/plot.py in show(self, xmin, xmax, ymin, ymax, figsize, filename, dpi, axes, axes_labels, frame, fontsize, aspect_ratio, gridlines, gridlinesstyle, vgridlinesstyle, hgridlinesstyle) 1363 gridlinesstyle=gridlinesstyle, 1364 vgridlinesstyle=vgridlinesstyle, - 1365 hgridlinesstyle=hgridlinesstyle) 1366 os.system('%s %s 2/dev/null 1/dev/null '%(sage.misc.viewer.browser(), filename)) 1367 /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/sage/plot/plot.py in save(self, filename, xmin, xmax, ymin, ymax, figsize, figure, sub, savenow, dpi, axes, axes_labels, fontsize, frame, verify, aspect_ratio, gridlines, gridlinesstyle, vgridlinesstyle, hgridlinesstyle) 1514 if isinstance(g, GraphicPrimitive_MatrixPlot): 1515 matrixplot = True - 1516 g._render_on_subplot(subplot) 1517 1518 #adjust the xy limits and draw the axes: /home/martin/sage-3.1.1/local/lib/python2.5/site-packages/sage/plot/plot.py in _render_on_subplot(self, subplot) 2064 del options['thickness'] 2065 del options['rgbcolor'] - 2066 p = patches.lines.Line2D(self.xdata, self.ydata, **options) 2067 options = self.options()
[sage-support] Re: no plotting
The correct syntax is sin(x), not sin x. And so the following works: sage: plot(sin(x), (-1,1)) Best, Alex -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/ --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: no plotting
Alex Ghitza [EMAIL PROTECTED] writes: The correct syntax is sin(x), not sin x. And so the following works: sage: plot(sin(x), (-1,1)) please reread what I typed. Yes I made this error, but after that, I used the correct syntax. Martin --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: no plotting
Sorry Martin, I completely missed the second sage: prompt in your original email. It's very likely that the problem is due to sage -upgrade. I don't know enough about these things to give you better advice than start over with a fresh download of Sage, and you've mentioned that this might not be an option for a while. Hopefully someone else on this list will know some magic to fix this. Note, however, that sage -upgrade is *not* recommended practice, precisely because this sort of problem keeps popping up over and over again. The recommended way of getting a new version is downloading the new binaries or source. Good luck, Alex On Sat, Oct 18, 2008 at 6:27 PM, Martin Rubey [EMAIL PROTECTED]wrote: I should have added: I did a sage -upgrade before. Doing sage -upgrade again I now get: Finished extraction There is no spkg-install script, no setup.py, and no configure script, so I do not know how to install /home/martin/sage-3.1.1/spkg/standard/sage-3.1.2.spkg. make: *** [installed/sage-3.1.2] Fehler 1 Command exited with non-zero status 2 1.54user 0.14system 0:02.16elapsed 78%CPU (0avgtext+0avgdata 0maxresident)k 200inputs+4736outputs (0major+7366minor)pagefaults 0swaps Martin -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/ --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: no plotting
On Oct 18, 12:56 am, Alex Ghitza [EMAIL PROTECTED] wrote: Sorry Martin, I completely missed the second sage: prompt in your original email. It's very likely that the problem is due to sage -upgrade. I don't know enough about these things to give you better advice than start over with a fresh download of Sage, and you've mentioned that this might not be an option for a while. Hopefully someone else on this list will know some magic to fix this. This is likely a gonner. Downgrades don't work too well :( Note, however, that sage -upgrade is *not* recommended practice, precisely because this sort of problem keeps popping up over and over again. The recommended way of getting a new version is downloading the new binaries or source. Right now since the 3.1.4 spkgs have not been pushed out -upgrade downgrades and likely breaks your build. If you want to upgrade a build when the online repo is not pushed out yet download the tar.gz and copy the new spkgs over the old ones in spkg/standard - then run make again. But I agree with Alex that one should only use upgrade when one is familiar enough with the Sage build system to fix bugs :) Good luck, Alex Cheers, Michael Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] multiply a list by a constant
Is there any bulit-in function of sage which can multiply each element of a list of numbers by a constant? e.g. I want 2*[3,4] = [6,8] without calling pari/gp. Thanks in advance --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: multiply a list by a constant
Hmmm. As far as I know you can use _ as a placeholder for a variable, and it's meant for this kind of use (where you don't really want to introduce a new variable name). It's strange that it doesn't work for you. Can you post the error message that you get? I guess it's not a big deal since you can always use x as you did, but if it's really not working it might be a sign of other trouble. Alex On Sun, Oct 19, 2008 at 3:31 PM, pong [EMAIL PROTECTED] wrote: Hi Alex Thanks for the quick reply. By _ you mean a variable? I tried your syntax but it does not work. However, [2*x for x in [3,4]] does work. -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/ --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---