Sage is an open source effort to replace the commercial math codes like Mathematica, Matlab, Magma with a free product of equal quality. It uses Python, my favorite language, as the glue that holds together a variety of existing open source math programs (Pari, Maxima, Numpy, Scipy, Blas, Lapack, etc.).

Such a product is a real revelation to me. I rarely have need for a symbolic math program, so that even though I have access to Maxima and Mathematica, I use them rarely enough so that when I do need them, I’ve completely forgotten the required syntax. But when I need the program, I really need it, which requires a long slog through the documentation. However, I use Python almost every minute of every day. But Python has its problems as well. Getting users to install all the various widgets required to run one of the pieces of software I write is itself very time consuming. Sage has solved all of this, as far as I can tell, by simply distributing all of the source code with the program. This makes for a rather time consuming build procedure, but one that worked for me the first time I tried it.

I’ve already mentioned how much I love Project Euler, and it’s gratifying to see Python making such a respectable showing on the statistics page there. However, I found that my versions of some very critical programs, like testing whether a number is prime, or computing the number of integer partitions, were enough slower than fast implementations, that my programs often took much longer than those written in Mathematica, for example. Sage solves all of these problems for me quite ably, and lets me use Python to write the code that drives the functions.

The graphics are worth noting as well. Sage has integrated the best Python plotting package (matplotlib) into a Firefox-driven duplicate of the Mathematica notebook into something that is both simple to use and elegant. They even have a free web portal for the program, where you can sign up for a free account and try things out.

Very slick and very, very well done. In all seriousness, I haven’t been this excited since I discovered Python for the first time.

End Links:

### Like this:

Like Loading...

*Related*

This entry was posted on February 1, 2008 at 1:03 pm and is filed under Programming, Python, Science.

## Leave a Reply