Live data from Hacker News

A computer algebra system written in Python

github.com

21–30 of 32 posts

Re: A computer algebra system written in Python

#21
post #5

How is it different from Sage[1]? (Quickstart here http://www.sagemath.org/tour-quickstart.html , and really awesome cloud version (that requires an account, but is very worth it here: https://cloud.sagemath.com/ ) [1]: http://www.sagemath.org/

I highly recommend looking at the comparison of the two mentioned in response to this. It's a bit out of date, though. It has a reference to SymPy 0.7.2 upcoming, but it's already past that.

Basically, Sage is more comprehensive as it pulls in a lot of different packages. SymPy is designed to be a Python CAS that you can use with other Python projects. Also, Sage doesn't directly support Windows, it requires the use of a VM image instead.

Re: A computer algebra system written in Python

#23
post #5

How is it different from Sage[1]? (Quickstart here http://www.sagemath.org/tour-quickstart.html , and really awesome cloud version (that requires an account, but is very worth it here: https://cloud.sagemath.com/ ) [1]: http://www.sagemath.org/

Sage is a collection of math tools for Python nicely packaged. The Sage collection includes Sympy.

Re: A computer algebra system written in Python

#25
post #3

Sympy is AWESOME! In particular, http://live.sympy.org is a great way to learn and teach math... I often send links to my students with an entire sequence of steps to find the solution. Can you factor x^2-5x+6 ? (find numbers a,b such that (x-a)(x-b)=x^2-5x+6) http://live.sympy.org/?evaluate=solve(%20x**2-5*x%2B6%2C%20x... (it's like an entire iPython notebook in a URL) On the topic of sympy, I'm working on this shor…

Seconded!

I used Sympy recently to solve the rocket equation. It involved some integrals that my rusty math skills couldn't solve so I used Sympy to solve them.

Then I ran a side by side comparison between the integrals I solved with Sympy against a numerical solution using Scipy and Numpy to verify that my results are correct.

The only negative thing about Sympy is that it's rather slow.

Here's the code if you're interested: https://gist.github.com/rikusalminen/6d6bb834d48b9664b38d

Re: A computer algebra system written in Python

#26

Earlier quoted context omitted.

Why not the ipython notebook, in that case?

I went through this same thought process about two years ago. IPython's notebook allows you to easily publish results. They include all you want and need: latex, imshow and nice code with many languages. But it's not good for generating results. Perhaps the area it lacks most in is querying variables. In QtConsole, you just type `plot(x)` and see a plot with no side effects. In the notebook on the other hand, you hav…

I don't agree. In the notebook, you can use "%pylab inline" or "%matplotlib inline" magic to have plots inline, but you can also not use it and have plots output to a separate window without any side effects in the notebook itself. Or use any other backend of your choice.

To select a previous cell just press UP in command mode (or press Esc-UP in any mode). Ref: http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/...

Re: A computer algebra system written in Python

#27
post #24

How does this compare with SAGE? I want to show this to my old math teacher who taught using that instead.

Sympy is included in Sage. Sage is just a collection of math tools in nice packaging.

Sage also has its own 1.5 million line python/cython library that is part of Sage (https://github.com/sagemath/sage/tree/master/src/sage)

Re: A computer algebra system written in Python

#28
post #3

Sympy is AWESOME! In particular, http://live.sympy.org is a great way to learn and teach math... I often send links to my students with an entire sequence of steps to find the solution. Can you factor x^2-5x+6 ? (find numbers a,b such that (x-a)(x-b)=x^2-5x+6) http://live.sympy.org/?evaluate=solve(%20x**2-5*x%2B6%2C%20x... (it's like an entire iPython notebook in a URL) On the topic of sympy, I'm working on this shor…

Just FYI, Sage also has the Sage Cell Server, which is similar in that you can do calculations on a webpage, but also allows embedding live cells in webpages easily, sage interacts, 3d graphics, etc. For example, here is your calculation: http://sagecell.sagemath.org/?q=mthhin. Click the "About" link in the upper right for more information.

Re: A computer algebra system written in Python

#29

When looking at Computer Algebra, you can't go past the original example of MacSyma (written in LISP). You can see an explanation of the MacSyma system in Peter Norvig's (head of Google researcyh) Paradigms of Artificial Intelligence (PAIP). http://norvig.com/paip/README.html http://norvig.com/paip/macsyma.lisp http://norvig.com/paip/macsymar.lisp http://norvig.com/paip/cmacsyma.lisp The original development of the M…

Another good algebra system written in lisp is Axiom (http://en.wikipedia.org/wiki/Axiom_%28computer_algebra_syste...), which is interesting for another reason too - it's probably the best example of literate programming around.

Re: A computer algebra system written in Python

#30
post #13

How does it compare to Maxima? http://maxima.sourceforge.net/

As a standalone CAS, Maxima is more fully featured than SymPy. But, it's harder to use with other packages. With SymPy, you can do your work with the CAS and then use the results with NumPy, SciPy, or Theano.
Post reply on HN