[sage-support] Symbol, commutative=False
Something I do not understand... from sympy import Symbol t=Symbol("t",commutative=True) A=Symbol("A",commutative=False) B=Symbol("B",commutative=False) So, now, I do: ee=(t*t/2)*(A+B)*(A+B) ee.expand() gives: t**2*A*B/2 + t**2*A**2/2 + t**2*B*A/2 + t**2*B**2/2 which is what I was waiting for... Now, do: ee=1+t*(A+B)+(t*t/2)*(A+B)*(A+B) I get: 1/2*A^2*t^2 + A*B*t^2 + 1/2*B^2*t^2 + A*t + B*t + 1 Which is not what I was waiting for! It looks like if A*B is considered as B*A in the second case! My Sage version is : 5.9. t.d. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out. <>
Re: [sage-support] Re: The results of some integration test.
> I have put the test suite in a Sage worksheet and added some comments. > I have moved the worksheet. It is now the public project 'CharlwoodFifty' at https://cloud.sagemath.com/ Unfortunately I do not know how to give a link to this project. Peter -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] The results of some integration test.
Interesting experiment. Your methodology for "diffs back" assumes correctly computing the derivative and correctly comparing symbolic expressions and for the latter counterexamples are known [1] bool( sqrt((a+b)^2) == sqrt(a^2) + sqrt(b^2) ) True btw, I get: 'sage.rings.complex_interval.ComplexIntervalFieldElement' object has no attribute 'cot' when trying your |check| on this: -arctan(cot(pi*x))/pi + 1/2 #fractional part of x [1] http://comments.gmane.org/gmane.comp.mathematics.sage.support/32115 On Wed, Sep 04, 2013 at 10:01:07AM -0700, Peter Luschny wrote: > Recently two integration test suites were discussed at sci.math.symbolic > [1], [2]. > > I executed the tests with Sage and put the results on my webpage [3]. > Not all results are favorable for Sage. Maybe this is worth to be > noted by some Sage developers. > > Peter > > [1] > https://groups.google.com/d/msg/sci.math.symbolic/UB0udwILOSw/msxc57stRM8J > [2] > https://groups.google.com/d/msg/sci.math.symbolic/D9W45zQTY3U/nIxsBZ-4RasJ > [3] http://luschny.de/math/quad/IntegralTestsSage.html > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Trouble saving graphics
I'm using Sage 5.11 on a Mac I've been used to creating graphs and then saving them as PDF's for inclusion in papers. Using code like this: sage: g = graphs.PetersenGraph() sage: pic = g.plot() sage: pic.save('pete.pdf') But now it just throws a bunch of errors: --- AssertionErrorTraceback (most recent call last) in () > 1 pic.save('pete.pdf') /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/sage/misc/decorators.pyc in wrapper(*args, **kwds) 456 kwds[self.name + "options"] = suboptions 457 --> 458 return func(*args, **kwds) 459 460 #Add the options specified by @options to the signature of the wrapped /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/sage/plot/graphics.pyc in save(self, filename, **kwds) 2753 figure.savefig(filename, dpi=dpi, bbox_inches='tight', 2754 bbox_extra_artists=self._bbox_extra_artists, -> 2755 transparent=transparent) 2756 else: 2757 figure.savefig(filename, dpi=dpi, /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/figure.pyc in savefig(self, *args, **kwargs) 1368 kwargs.setdefault('edgecolor', rcParams['savefig.edgecolor']) 1369 -> 1370 self.canvas.print_figure(*args, **kwargs) 1371 1372 if transparent: /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2053 orientation=orientation, 2054 dryrun=True, -> 2055 **kwargs) 2056 renderer = self.figure._cachedRenderer 2057 bbox_inches = self.figure.get_tightbbox(renderer) /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_pdf(self, *args, **kwargs) 1846 from backends.backend_pdf import FigureCanvasPdf # lazy import 1847 pdf = self.switch_backends(FigureCanvasPdf) -> 1848 return pdf.print_pdf(*args, **kwargs) 1849 1850 def print_pgf(self, *args, **kwargs): /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py in print_pdf(self, filename, **kwargs) 2299 width, height, image_dpi, RendererPdf(file, image_dpi), 2300 bbox_inches_restore=_bbox_inches_restore) -> 2301 self.figure.draw(renderer) 2302 renderer.finalize() 2303 finally: /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *args, **kwargs) 55 after(artist, renderer) 56 /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer) 1004 dsu.sort(key=itemgetter(0)) 1005 for zorder, a, func, args in dsu: -> 1006 func(*args) 1007 1008 renderer.close_group('figure') /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *args, **kwargs) 55 after(artist, renderer) 56 /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/axes.pyc in draw(self, renderer, inframe) 2084 2085 for zorder, a in dsu: -> 2086 a.draw(renderer) 2087 2088 renderer.close_group('axes') /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *args, **kwargs) 55 after(artist, renderer) 56 /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/collections.pyc in draw(self, renderer) 693 (np.sqrt(x) * self.figure.dpi / 72.0)) 694 for x in self._sizes] --> 695 return Collection.draw(self, renderer) 696 697 class PolyCollection(Collection): /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *arg
Re: [sage-support] The results of some integration test.
>Your methodology for "diffs back" assumes >correctly computing the derivative and correctly >comparing symbolic expressions and for the latter >counterexamples are known Yes. This is just an indicator of possible problems, nothing more. "diffs back" checks f == 0 which is incorrect a priori, it should be f == c for some constant. (See for example problem(24).) But as a warning lamp for the reviewer it works quite well. > 'sage.rings.complex_interval.ComplexIntervalFieldElement' > object has no attribute 'cot' There are many similar errors of this kind. I have been told that they reflect some other Sage bug not related to integration. The most weird thing I observed occurs in connection with Charlwood's problem 8. Sometimes Sage quits with an RuntimeError and sometimes Sage returns a monster solution. Indefinite integration by a Monte Carlo method? Something for the Journal of Irreproducible Results ;-) Peter -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Trouble saving graphics
It seems saving to pdf is broken on sage-5.10 onwards. Works till sage-5.9. The problem is only in graphs. Normal plots work fine. I have opened http://trac.sagemath.org/ticket/15173 to track this. On 09/07/2013 09:06 PM, Ed Scheinerman wrote: I'm using Sage 5.11 on a Mac I've been used to creating graphs and then saving them as PDF's for inclusion in papers. Using code like this: sage: g = graphs.PetersenGraph() sage: pic = g.plot() sage: pic.save('pete.pdf') But now it just throws a bunch of errors: --- AssertionErrorTraceback (most recent call last) in () > 1 pic.save('pete.pdf') /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/sage/misc/decorators.pyc in wrapper(*args, **kwds) 456 kwds[self.name + "options"] = suboptions 457 --> 458 return func(*args, **kwds) 459 460 #Add the options specified by @options to the signature of the wrapped /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/sage/plot/graphics.pyc in save(self, filename, **kwds) 2753 figure.savefig(filename, dpi=dpi, bbox_inches='tight', 2754 bbox_extra_artists=self._bbox_extra_artists, -> 2755 transparent=transparent) 2756 else: 2757 figure.savefig(filename, dpi=dpi, /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/figure.pyc in savefig(self, *args, **kwargs) 1368 kwargs.setdefault('edgecolor', rcParams['savefig.edgecolor']) 1369 -> 1370 self.canvas.print_figure(*args, **kwargs) 1371 1372 if transparent: /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs) 2053 orientation=orientation, 2054 dryrun=True, -> 2055 **kwargs) 2056 renderer = self.figure._cachedRenderer 2057 bbox_inches = self.figure.get_tightbbox(renderer) /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_pdf(self, *args, **kwargs) 1846 from backends.backend_pdf import FigureCanvasPdf # lazy import 1847 pdf = self.switch_backends(FigureCanvasPdf) -> 1848 return pdf.print_pdf(*args, **kwargs) 1849 1850 def print_pgf(self, *args, **kwargs): /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py in print_pdf(self, filename, **kwargs) 2299 width, height, image_dpi, RendererPdf(file, image_dpi), 2300 bbox_inches_restore=_bbox_inches_restore) -> 2301 self.figure.draw(renderer) 2302 renderer.finalize() 2303 finally: /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *args, **kwargs) 55 after(artist, renderer) 56 /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer) 1004 dsu.sort(key=itemgetter(0)) 1005 for zorder, a, func, args in dsu: -> 1006 func(*args) 1007 1008 renderer.close_group('figure') /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *args, **kwargs) 55 after(artist, renderer) 56 /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/axes.pyc in draw(self, renderer, inframe) 2084 2085 for zorder, a in dsu: -> 2086 a.draw(renderer) 2087 2088 renderer.close_group('axes') /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs) 52 def draw_wrapper(artist, renderer, *args, **kwargs): 53 before(artist, renderer) ---> 54 draw(artist, renderer, *args, **kwargs) 55 after(artist, renderer) 56 /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/collections.pyc in draw(self, renderer) 693 (np.sqrt(x) * self.figure.dpi / 72.0)) 694 for x in self._sizes] --> 695 return Collection.draw(self, renderer) 696 697 class PolyCollection(Collection): /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib
[sage-support] autoeval in sagecell
I am wondering why only the first cell in the following is automatically evaluated: http://people.reed.edu/~davidp/211/sage/sagecell/tangent_plane.html I have autoeval set to 'True' and notice that if I add 1+1 at the end, it is automatically evaluated. Thanks in advance for any suggestions. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Problems with cell not refreshing in notebook
I am using Mac OS 10.8 and Sage 5.11 in a browser (Safari or Chrome). I recently noticed that whenever I do a calculation in a notebook, and hit shift-enter, nothing happens (green line at the left, no output). After some experimentation, I found that refreshing the browser (command-R) solves the problem. However, it is quite annoying, and it compromises using interactives, which I do all the time in my classes. Now when I change an interactive input value, the display will not change until I also hit command-R. I have no idea why this is happening. I had not used Sage in some time before this happened. Doesn't matter if I use Safari or Chrome, but no problems when in Terminal mode. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-support] Sage installation
On Sep 2, 2013, at 7:32 AM, kcrisman wrote: > On Monday, September 2, 2013 9:12:33 AM UTC-4, arshpreet singh wrote: > On Mon, Sep 2, 2013 at 5:05 PM, casper sky wrote: > Hello, I want to know that can I install Sage on my iPad as I'm using it on > my mac ? > > yes you can see the link below: > > https://itunes.apple.com/in/app/sage-math/id496492945?mt=8 > > But note that this is not a full Sage installation; it is a service that uses > sagecell.sagemath.org , so the limits of that service in terms of computation > length etc. would apply. Indeed. You can also just use Safari to access a "normal" sage notebook server [1], and then create a shortcut for it. It should be theoretically be possible to install Sage itself on the iPad, but AFAIK no one has done it yet. I suspect it is somewhat difficult. And distributing it via the app store may not be possible due Apple's restrictions on interpreted languages. -Ivan [1] e.g. http://sagenb.org or http://cloud.sagemath.org -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
[sage-support] Re: Trouble saving graphics
I found a temporary workaround. Save as .eps (which works fine) and then use epstopdf to convert to .pdf. On Saturday, September 7, 2013 12:01:40 PM UTC-4, P Purkayastha wrote: > > It seems saving to pdf is broken on sage-5.10 onwards. Works till > sage-5.9. The problem is only in graphs. Normal plots work fine. > > I have opened http://trac.sagemath.org/ticket/15173 to track this. > > On 09/07/2013 09:06 PM, Ed Scheinerman wrote: > > I'm using Sage 5.11 on a Mac > > > > I've been used to creating graphs and then saving them as PDF's for > > inclusion in papers. Using code like this: > > > > sage: g = graphs.PetersenGraph() > > sage: pic = g.plot() > > sage: pic.save('pete.pdf') > > > > But now it just throws a bunch of errors: > > > > > --- > > AssertionErrorTraceback (most recent call > last) > > in () > > > 1 pic.save('pete.pdf') > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/sage/misc/decorators.pyc > > > > in wrapper(*args, **kwds) > > 456 kwds[self.name + "options"] = suboptions > > 457 > > --> 458 return func(*args, **kwds) > > 459 > > 460 #Add the options specified by @options to the signature > > of the wrapped > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/sage/plot/graphics.pyc > > > > in save(self, filename, **kwds) > > 2753 figure.savefig(filename, dpi=dpi, > > bbox_inches='tight', > > 2754 > bbox_extra_artists=self._bbox_extra_artists, > > -> 2755 transparent=transparent) > > 2756 else: > > 2757 figure.savefig(filename, dpi=dpi, > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/figure.pyc > > > > in savefig(self, *args, **kwargs) > > 1368 kwargs.setdefault('edgecolor', > > rcParams['savefig.edgecolor']) > > 1369 > > -> 1370 self.canvas.print_figure(*args, **kwargs) > > 1371 > > 1372 if transparent: > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backend_bases.pyc > > > > in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, > > format, **kwargs) > > 2053 orientation=orientation, > > 2054 dryrun=True, > > -> 2055 **kwargs) > > 2056 renderer = self.figure._cachedRenderer > > 2057 bbox_inches = > self.figure.get_tightbbox(renderer) > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backend_bases.pyc > > > > in print_pdf(self, *args, **kwargs) > > 1846 from backends.backend_pdf import FigureCanvasPdf # lazy > > import > > 1847 pdf = self.switch_backends(FigureCanvasPdf) > > -> 1848 return pdf.print_pdf(*args, **kwargs) > > 1849 > > 1850 def print_pgf(self, *args, **kwargs): > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py > > > > in print_pdf(self, filename, **kwargs) > > 2299 width, height, > > image_dpi, RendererPdf(file, image_dpi), > > 2300 > > bbox_inches_restore=_bbox_inches_restore) > > -> 2301 self.figure.draw(renderer) > > 2302 renderer.finalize() > > 2303 finally: > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc > > > > in draw_wrapper(artist, renderer, *args, **kwargs) > > 52 def draw_wrapper(artist, renderer, *args, **kwargs): > > 53 before(artist, renderer) > > ---> 54 draw(artist, renderer, *args, **kwargs) > > 55 after(artist, renderer) > > 56 > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/figure.pyc > > > > in draw(self, renderer) > > 1004 dsu.sort(key=itemgetter(0)) > > 1005 for zorder, a, func, args in dsu: > > -> 1006 func(*args) > > 1007 > > 1008 renderer.close_group('figure') > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/artist.pyc > > > > in draw_wrapper(artist, renderer, *args, **kwargs) > > 52 def draw_wrapper(artist, renderer, *args, **kwargs): > > 53 before(artist, renderer) > > ---> 54 draw(artist, renderer, *args, **kwargs) > > 55 after(artist, renderer) > > 56 > > > > > /Users/ers/share/sage-5.11/local/lib/python2.7/site-packages/matplotlib/axes.pyc > > > > in draw(self, renderer, inframe) > > 2084 > > 2085 for zorder, a in dsu: > > -> 2086 a.draw(renderer) > > 2087 > > 2088 rende
[sage-support] Re: autoeval in sagecell
On 9/7/13 11:30 AM, davidp wrote: I am wondering why only the first cell in the following is automatically evaluated: http://people.reed.edu/~davidp/211/sage/sagecell/tangent_plane.html I have autoeval set to 'True' and notice that if I add 1+1 at the end, it is automatically evaluated. Thanks in advance for any suggestions. It looks like a bug is lurking somewhere. I'll try to look at this soon (hopefully next week). I've filed this at https://github.com/sagemath/sagecell/issues/428 Thanks, Jason -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.