Sunday, July 14, 2013

SymPy 0.7.3 is released

I'm happy to announce the release of SymPy 0.7.3.  It can be
downloaded from The release
notes for this release are at

To update SymPy, you can use pip install sympy --upgrade or download
the source and use install. SymPy has no dependencies.

Some highlights:

  • Improved integrate() with the Risch algorithm, and it now splits integrals into Piecewise more often. Support for more special functions.
  • Basic infrastructure for the PDE module.
  • Many improvements to the matrix expressions, and assumptions relating to them.
  • New context manager for the new assumptions (with assuming(...)).
  • This will be the last version of SymPy to support Python 2.5.
  • Many bug fixes.

Note: I suspect that these release notes are still not complete. If
you know of any new major change in this release that is not there,
please edit the wiki page and add it.

The following people contributed at least one patch to this release
(names are given in alphabetical order by last name). A total of 85
people contributed to this release. People with a * by their names
contributed a patch for the first time for this release; 56 people
contributed for the first time for this release.

I particularly want to thank Ondrej, who helped set up an
infrastructure for automating this release, without with this release
would not have been possible.

Thanks to everyone who contributed to this release!

  • Acebulf*
  • Akshit Agarwal*
  • Ankit Agrawal*
  • Tom Bachmann
  • Madeleine Ball*
  • Raoul Bourquin
  • Christian Bühler
  • CJ Carey*
  • Ondřej Čertík
  • Mary Clark*
  • Chris Conley*
  • Renato Coutinho
  • Björn Dahlgren*
  • Christopher Dembia*
  • Guru Devanla
  • Rishabh Dixit*
  • Alexander Eberspächer*
  • Pavel Fedotov
  • Benjamin Fishbein*
  • Sean Ge*
  • Gilbert Gede
  • Brian E. Granger
  • Angus Griffith*
  • Chetna Gupta*
  • Ananya H*
  • Randy Heydon*
  • Alexander Hirzel*
  • Thomas Hisch*
  • hm*
  • Matthew Hoff*
  • Case Van Horsen*
  • Katja Sophie Hotz*
  • Max Hutchinson*
  • Sachin Irukula
  • Sergiu Ivanov
  • Amit Jamadagni*
  • Saurabh Jha
  • Sachin Joglekar*
  • Varun Joshi*
  • Robert Kern
  • Sergey B Kirpichev*
  • Stefan Krastanov
  • Manoj Kumar*
  • Patrick Lacasse*
  • Ronan Lamy
  • Colleen Lee*
  • Oliver Lee*
  • David Li
  • Stephen Loo*
  • Huijun Mai*
  • Aaron Meurer
  • Angadh Nanjangud
  • Eric Nelson*
  • Sherjil Ozair
  • Mateusz Paprocki
  • Tarang Patel*
  • Khagesh Patel*
  • Mario Pernici
  • Luke Peterson
  • Tyler Pirtle*
  • Vasily Povalyaev*
  • Seshagiri Prabhu*
  • Pradyumna*
  • Roland Puntaier*
  • Bharath M R
  • Shravas K Rao*
  • Thilina Rathnayake*
  • Timothy Reluga*
  • Julien Rioux
  • Matthew Rocklin
  • Christophe Saint-Jean*
  • Prasoon Shukla*
  • Chris Smith
  • Cristóvão Sousa
  • Brian Stephanik*
  • Marek Šuppa*
  • Tim Swast*
  • Grzegorz Świrski
  • Matthew Tadd*
  • Niklas Thörne*
  • Ramana Venkata*
  • Sean Vig
  • Demian Wassermann*
  • Erik Welch*
  • Stefen Yin*

Monday, April 8, 2013

Google Summer of Code 2013

SymPy was accepted by Google once again to participate in Google Summer of Code for 2013. Please go to for more information about how to apply and get started.

Friday, October 19, 2012

SymPy 0.7.2 is released

Major Changes

Python 3 support

SymPy now supports Python 3. The officially supported versions are 3.2 and 3.3, but 3.1 should also work in a pinch. The Python 3-compatible tarballs will be provided separately, but it is also possible to download Python 2 code and convert it manually, via the bin/use2to3 utility. See the README for more

PyPy support

All SymPy tests pass in recent nightlies of PyPy, and so it should have full support as of the next version after 1.9.


A new module called Combinatorics was added which is the result of a successful GSoC project. It attempts to replicate the functionality of Combinatorica and currently has full featured support for Permutations, Subsets, Gray codes and Prufer codes.
In another GSoC project, facilities from computational group theory were added to the combinatorics module, mainly following the book "Handbook of computational group theory". Currently only permutation groups are supported. The main functionalities are: basic properties (orbits, stabilizers, random elements...), the Schreier-Sims algorithm (three implementations, in increasing speed: with Jerrum's filter, incremental, and randomized (Monte Carlo)), backtrack searching for subgroups with certain properties.

Definite Integration

A new module called meijerint was added, which is also the result of a successful GSoC project. It implements a heuristic algorithm for (mainly) definite integration, similar to the one used in Mathematica. The code is automatically called by the standard integrate() function. This new algorithm allows computation of important integral transforms in many interesting cases, so helper functions for Laplace, Fourier and Mellin transforms were added as well.

Random Variables

A new module called stats was added. This introduces a RandomSymbol type which can be used to model uncertainty in expressions.

Matrix Expressions

A new matrix submodule named expressions was added. This introduces a MatrixSymbol type which can be used to describe a matrix without explicitly stating its entries. A new family of expression types were also added: Transpose, Inverse, Trace, and BlockMatrix. ImmutableMatrix was added so that explicitly defined matrices could interact with other SymPy expressions.


A number of new sets were added including atomic sets like FiniteSet, Reals, Naturals, Integers, UniversalSet as well as compound sets like ProductSet and TransformationSet. Using these building blocks it is possible to build up a great variety of interesting sets.

Classical Mechanics

A physics submodule named machanics was added which assists in formation of equations of motion for constrained multi-body systems. It is the result of 3 GSoC projects. Some nontrivial systems can be solved, and examples are provided.

Quantum Mechanics

Density operator module has been added. The operator can be initialized with generic Kets or Qubits. The Density operator can also work with TensorProducts as arguments. Global methods are also added that compute entropy and fidelity of states. Trace and partial-trace operations can also be performed on these density operators.
To enable partial trace operations a Tr module has been added to the core library. While the functionality should remain same, this module is likely to be relocated to an alternate folder in the future. One can currently also use sympy.core.Tr to work on general trace operations, but this module is what is needed to work on trace and partial-trace operations on any sympy.physics.quantum objects.
The Density operators, Tr and Partial trace functionality was implemented as part of student participation in GSoC 2012
Expanded angular momentum to include coupled-basis states and product-basis states. Operators can also be treated as acting on the coupled basis (default behavior) or on one component of the tensor product states. The methods for coupling and uncoupling these states can work on an arbitrary number of states. Representing, rewriting and applying states and operators between bases has been improved.

Commutative Algebra

A new module agca was started which seeks to support computations in commutative algebra (and eventually algebraic geometry) in the style of Macaulay2 and Singular. Currently there is support for computing Groebner bases of modules over a (generalized) polynomial ring over a field. Based on this, there are algorithms for various standard problems in commutative algebra, e.g., computing intersections of submodules, equality tests in quotient rings, etc....

Plotting Module

A new plotting module has been added which uses Matplotlib as its back-end. The plotting module has functions to plot the following:
  • 2D line plots
  • 2D parametric plots.
  • 2D implicit and region plots.
  • 3D surface plots.
  • 3D parametric surface plots.
  • 3D parametric line plots.

Differential Geometry

Thanks to a GSoC project the beginning of a new module covering the theory of differential geometry was started. It can be imported withsympy.diffgeom. It is based on "Functional Differential Geometry" by Sussman and Wisdom. Currently implemented are scalar, vector and form fields over manifolds as well as covariant and other derivatives.

Backwards compatibility breaks

-The KroneckerDelta class was moved from sympy/physics/quantum/ to sympy/functions/special/
  • Merged the KroneckerDelta class in sympy/physics/ with the class above.
  • The Dij class in sympy/functions/special/ was replaced with KroneckerDelta.
  • The errors raised for invalid float calls on SymPy objects were changed in order to emulate more closely the errors raised by the standard library. The __float__ and __complex__ methods of Expr are concerned with that change.
  • The solve() function returns empty lists instead of None objects if no solutions were found. Idiomatic code of the formsol = solve(...); if sol:... will not be affected by this change.
  • Piecewise no longer accepts a Set or Interval as a condition. One should explicitly specify a variable using Set().contains(x) to obtain a valid conditional.
  • The statistics module has been deprecated in favor of the new stats module.
  • sympy/galgebra/
  • set_main() is no longer needed
  • make_symbols() is deprecated (use sympy.symbols() instead)
  • the symbols used in this package are no longer broadcast to the main program
  • The classes for Infinity, NegativeInfinity, and NaN no longer subclass from Rational. Creating a Rational with 0 in the denominator will still return one of these classes, however.

Other Changes

  • A new module gaussopt was added supporting the most basic constructions from Gaussian optics (ray tracing matrices, geometric rays and Gaussian beams).
  • New classes were added to represent the following special functions: classical and generalized exponential integrals (Ei, expint), trigonometric (Si, Ci) and hyperbolic integrals (Shi, Chi), the polylogarithm (polylog) and the Lerch transcendent (lerchphi). In addition to providing all the standard sympy functionality (differentiation, numerical evaluation, rewriting ...), they are supported by both the new meijerint module and the existing hypergeometric function simplification module.
  • An ImmutableMatrix class was created. It has the same interface and functionality of the old Matrix but is immutable and inherits from Basic.
  • A new function in geometry.util named centroid was added which will calculate the centroid of a collection of geometric entities. And the polygon module now allows triangles to be instantiated from combinations of side lengths and angles (using keywords sss, asa, sas) and defines utility functions to convert between degrees and radians.
  • In ntheory.modular there is a function (solve_congruence) to solve congruences such as "What number is 2 mod 3, 3 mod 5 and 2 mod 7?"
  • A utility function named find_unit has been added to physcis.units that allows one to find units that match a given pattern or contain a given unit.
  • There have been some additions and modifications to Expr's methods:
  • Although the problem of proving that two expressions are equal is in general a difficult one (since whatever algorithm is used, there will always be an expression that will slip through the algorithm) the new method of Expr named equals will do its best to answer whether A equals B: A.equals(B) might given True, False or None.
  • coeff now supports a third argument n (which comes 2nd now, instead of right). This n is used to indicate the exponent on x which one seeks: (x**2 + 3*x + 4).coeff(x, 1) -> 3. This makes it possible to extract the constant term from a polynomial:(x**2 + 3*x + 4).coeff(x, 0) -> 4.
  • The method round has been added to round a SymPy expression to a given a number of decimal places (to the left or right of the decimal point).
  • divmod is now supported for all SymPy numbers.
  • In the simplify module, the algorithms for denesting of radicals (sqrtdenest) and simplifying gamma functions (in combsimp) has been significantly improved.
  • The mathematica-similar TableForm function has been added to the printing.tableform module so one can easily generate tables with headings.
  • In addition to the more noticeable changes listed above, there have been numerous smaller additions, improvements and bug fixes in the commits in this release. See the git log for a full list of all changes. The command git log sympy-0.7.1..sympy-0.7.2 will show all commits made between this release and the last. You can also see the issues closed since the last release here.
  • The expand API has been updated. expand() now officially supports arbitrary _eval_expand_hint() methods on custom objects._eval_expand_hint() methods are now only responsible for expanding the top-level expression. All deep=True related logic happens inexpand() itself. See the docstring of expand() for more information and an example.
  • Two options were added to isympy to aid in interactive usage. isympy -a automatically creates symbols, so that typing something likea will give Symbol('a'), even if you never typed a = Symbol('a') or var('a')isympy -i automatically wraps integer literals with Integer, so that 1/2 will give Rational(1, 2) instead of 0.5isympy -I is the same as isympy -a -iisympy -I makes isympy act much more like a traditional interactive computer algebra system. These both require IPython.
  • The official documentation at now includes an extension that automatically hooks the documentation examples in toSymPy Live.


The following people contributed at least one patch to this release (names are given in alphabetical order by last name). A total of 103 people contributed to this release. People with a * by their names contributed a patch for the first time for this release; 77 people contributed for the first time for this release.
Thanks to everyone who contributed to this release!
  • Sanket Agarwal*
  • Swapnil Agarwal*
  • Bilal Akhtar*
  • Nathan Alison*
  • Steve Anton*
  • Takafumi Arakaki*
  • Chancellor Arkantos*
  • Manoj Babu K.*
  • Tom Bachmann
  • Oscar Benjamin
  • Raoul Bourquin*
  • Christian Bühler*
  • Jorge E. Cardona*
  • Ondřej Čertík
  • Puneeth Chaganti*
  • Roberto Colistete, Jr.*
  • Renato Coutinho
  • Joan Creus*
  • Addison Cugini
  • Guru Devanla*
  • Joseph Dougherty*
  • Comer Duncan*
  • Joachim Durchholz*
  • Tarun Gaba*
  • Luis Garcia*
  • Gilbert Gede
  • Arpit Goyal*
  • Brian E. Granger
  • Alexey U. Gudchenko
  • Alexandr Gudulin*
  • Matt Habel*
  • Tristan Hume*
  • Kevin Hunter*
  • Gert-Ludwig Ingold*
  • Sachin Irukula*
  • Sergiu Ivanov*
  • Siddhant Jain*
  • Saurabh Jha*
  • Fredrik Johansson
  • David Ju*
  • Kendhia*
  • Andreas Kloeckner*
  • Carsten Knoll*
  • Piotr Korgul*
  • Marcin Kostrzewa*
  • Stefan Krastanov
  • Priit Laes
  • Tim Lahey*
  • Ronan Lamy
  • Nikolay Lazarov*
  • Tomo Lazovich
  • Tobias Lenz*
  • David Li*
  • Bharath M R*
  • Sam Magura
  • Aleksandar Makelov*
  • Saptarshi Mandal
  • Imran Ahmed Manzoor*
  • Shruti Mangipudi*
  • Davy Mao*
  • Miha Marolt*
  • marshall2389*
  • Michael Mayorov*
  • Aaron Meurer
  • Raphael Michel*
  • Jason Moore*
  • Ljubiša Moćić*
  • Angadh Nanjangud*
  • Natalia Nawara*
  • Jens H. Nielsen*
  • Sai Nikhil*
  • Ashwini Oruganti*
  • Prateek Papriwal*
  • Mateusz Paprocki
  • Vladimir Perić
  • Mario Pernici
  • Luke Peterson
  • Alexandr Popov*
  • Nicolas Pourcelot
  • Martin Povišer*
  • Matt Rajca*
  • Julien Rioux*
  • Matthew Rocklin
  • Nikhil Sarda
  • Siddhanathan Shanmugam*
  • Stepan Simsa*
  • Sam Sleight*
  • Chris Smith
  • Geoffry Song*
  • Andrew Straw
  • Alexey Subach*
  • Grzegorz Świrski*
  • Prafullkumar P. Tale
  • Matthias Toews*
  • tsmars15*
  • Nichita Utiu*
  • Srinivas Vasudevan*
  • Sean Vig
  • vishal*
  • George Waksman*
  • Luca Weihs
  • Raymond Wong
  • Jeremias Yehdegho
  • Jim Zhang*
  • Tiffany Zhu*
  • jerryma1121*
  • Rom le Clair*

Friday, April 27, 2012

GSoC 2012 Results Announced

Google has announced the results for Google Summer of Code. I am proud to announce that we got six slots from Google. The following projects have been accepted:

(Project, Student, Mentor)
- Category Theory Module, Sergiu Ivanov, Tom Bachmann
- Density Operators for Quantum Module in sympy.physics.quantum, Guru Devanla, Brian Granger (co-mentor Sean Vig)
- Enhancements to sympy.physics.mechanics, Angadh Nanjangud, Gilbert Gede
- Group Theory, Aleksandar Makelov, David Joyner (co-mentor Aaron Meurer)
- Implicit Plotting Module, Bharath M R, Aaron Meurer
- Vector Analysis, Stefan Krastanov, Matthew Rocklin

Join me in congratulating these students on their acceptance.

In case you don't know, Google Summer of Code is a program where Google pays students to write code for open source projects. SymPy was accepted as a mentoring organization this year. The goal of the program is to help the students learn new skills, in particular in our case:

* contributing to opensource * working with the community * learn git, pull requests, reviews * teach them how to review other's people patches * do useful work for SymPy * have fun, and encourage the students to stay around

To all the students who are accepted, you should be receiving an email from your mentor soon to discuss how you will be communicating over the summer about your project. You should meet with your mentor about once a week during the summer to go over your progress. You should either meet on a public channel (like IRC), or else post minutes of your meeting in some public channel, so that the whole community can see your progress too.

Some of you may also be assigned a backup mentor or co-mentor. These people will also help out in mentoring your project. If you have two mentors and one is not available for something, or does not know the answer, you can ask your co-mentor.

I would like all of us to strongly encourage students this summer to submit pull requests early and often. This will go a long ways towards making sure that you don't end the summer with a ton of code written that never gets merged. Students should help review pull requests by other students, so that we don't get bogged down reviewing so much code.

We also require that all students keep a weekly blog of their work over the summer. If you don't already have a blog, you should start one. I recommend using either Wordpress or Blogger (I personally use and prefer Wordpress because it has a cleaner interface and lets you do $latex math$, but I recommend you test out both). You can also use some other service too if you like. The only requirement is that it has an RSS feed, so we can put it on Once you have set up your blog, send me the url so I can add it there.

Starting on the week of May 21 (when the GSoC period officially begins), We will expect you to have at least one blog post a week, describing your progress for that week, or something interesting about your project. If you don't have a post by the beginning of the day on Saturday, your mentor or I will email you to remind you about it.

I invite other mentors who have blogs to blog as well. And I encourage all community members to follow the student blogs, so you can see their progress.

I would like to thank all the students who applied this year and everyone who submitted a patch. We received way more feedback this year than we ever have before. I would also like to thank all the mentors for helping review patches and proposals.

This summer is looking to be another very productive one for SymPy, and I look forward to it!

Friday, March 16, 2012

Google Summer of Code 2012

SymPy was accepted by Google once again to participate in Google Summer of Code for 2012. Please go to for more information about how to apply and get started.

Monday, December 12, 2011

Google Summer of Code 2011 Wrap-Up

(Cross-posted on the Google Open Source Blog)

SymPy is a computer algebra system (CAS) written in pure Python. The core allows basic manipulation of expressions (like differentiation or expansion) and it contains many modules for common tasks (limits, integrals, differential equations, series, matrices, quantum physics, geometry, plotting, and code generation).

SymPy has participated in the Google Summer of Code program in previous years under the umbrellas of Python Software Foundation, Portland State University, and the Space Telescope Science Institute, where we were very successful. In fact, several of our core developers, including four of the mentors from this year, started working with SymPy as Google Summer of Code students. This was our first year participating as a standalone organization, and we would like to share our experience.

As part of the application process we required each student to submit a patch (as a GitHub pull request) that had to be reviewed and accepted. This allowed us to see that each applicant knew how to use git as well as communicate effectively during the review process.This also encouraged only serious applicants to apply. We had over 10 mentors available and we ended up with 9 students, all of whom were successful at final evaluations.

Tom Bachmann - Definite Integration using Meijer G-functions, mentored by Aaron Meurer
Tom implemented an algorithm for computing symbolic definite integrals that uses so-called Meijer G-functions. This is the state-of-the-art algorithm for computing definite integrals, and indeed the results of his project are very impressive. This project has pushed SymPy forward a long way to becoming the strongest open source computer algebra system with respect to symbolic definite integration.

Vladimir Peric - Porting to Python 3, mentored by Ronan Lamy
Vladimir ported SymPy to work on Python 3 and ported all testing infrastructure so that SymPy gets regularly tested in Python 2.x, 3.2 and PyPy. Thanks to Vladimir’s work, the next version of SymPy, 0.7.2, which will hopefully be released later this year, will work in both Python 2 and Python 3, and it may support PyPy as well.

Gilbert Gede - PyDy, mentored by Luke Peterson
Gilbert implemented a physics module to assist in generating symbolic equations of motion for complex multibody systems using Kane's Method. He expanded on the code written by his mentor, Luke, in 2009, and the module can now generate equations of motion for a bicycle. Gilbert also wrote very thorough documentation both for the Kane’s Method and the module in SymPy.

Tomo Lazovich - Position and Momentum Bases for Quantum Mechanics, mentored by Brian Granger
Tomo has greatly improved the quantum mechanics module by implementing position/momentum representations for operators and eigenstates in various coordinate systems (including cartesian, cylindrical, and spherical) that allows you to easily represent many of the "textbook" quantum mechanics systems, including particle in a box, simple harmonic oscillator, hydrogen atom, etc.

Saptarshi Mandal - Combinatorics package for Sympy, mentored by Christian Muise
Saptarshi’s project was to mimic the various capabilities of Combinatorica, a Mathematica package for combinatorics. Most of the functionality involving elementary combinatorial objects such as Permutations, Partitions, Subsets, Gray codes and Prufer codes are complete.

Sherjil Ozair - Symbolic Linear Algebra, mentored by Vinzent Steinberg
Sherjil improved the speed of the linear algebra module by using efficient coefficient types for values of entries of matrices. Previously, SymPy used generic expressions in this place, which slowed down computations considerably and caused trouble with solving of the zero equivalence problem. He also implemented sparse matrix representation and unified the API with dense matrices. In addition, Sherjil also added a few linear algebra related algorithms (e.g. Cholesky decomposition).

Matthew Rocklin - SymPy Stats: Random Variables, mentored by Andy Terrel
Matthew improved the statistics module to use symbolics and introduced a Random Variable type, with support for finite, continuous, and multivariable normal random variables. With these you can symbolically compute things like probabilities of a given condition, conditional spaces, and expectation values. As a side consequence of this project, he also improved some of our Sets classes and implemented a MatrixExpr class, which allows you to compute with matrices symbolically, including computing with block matrices.

Sean Vig - Symbolic Clebsch-Gordon coefficients/Wigner symbols and Implementing Addition of Spin Angular Momenta, mentored by Ondřej Čertík
Sean was working on the quantum mechanics module and has implemented symbolic Clebsch-Gordan coefficients, Wigner D function, and related mathematical concepts that are used very often in quantum physics when dealing with angular momentum and then the necessary classes to support coupled spin algebra.

Jeremias Yehdegho - Implementing F5, mentored by Mateusz Paprocki
Jeremias worked on implementing algorithms related to Groebner bases. Groebner bases are a useful tool in many areas of computer algebra. He implemented the F5B algorithm, which is an improved version of the classical Buchberger’s algorithm that was previously implemented in SymPy, and an algorithm for converting Groebner bases between different orders of monomials and worked on applications of Groebner bases. This allowed for handling problems of much larger size in SymPy.

The full report can be found here, where each student wrote a wiki page about their experience during the summer and you can also find their blogs and links to applications. Each student was required to blog about their progress each week and all blogs were synchronized at

In previous years, there was usually one student from each summer who became a regular contributor and also a mentor for the next year. It has been a rewarding experience for the whole SymPy community.

Friday, July 29, 2011

SymPy 0.7.1 Released

SymPy 0.7.1 has been released on July 29, 2011. It is available at

The source distribution can be downloaded from:

You can get the Windows installer here:

And the html documentation here:

About SymPy

SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python.

Release notes

Major changes

- Python 2.4 is no longer supported. SymPy will not work at all in
Python 2.4. If you still need to use SymPy under Python 2.4 for some
reason, you will need to use SymPy 0.7.0 or earlier.

- The Pyglet plotting library is now an (optional) external dependency.
Previously, we shipped a version of Pyglet with SymPy, but this was
old and buggy. The plan is to eventually make the plotting in SymPy
much more modular, so that it supports many backends, but this has not
been done yet. For now, still only Pyglet is directly supported.
Note that Pyglet is only an optional dependency and is only needed for
plotting. The rest of SymPy can still be used without any dependencies
(except for Python).

- isympy now works with the new IPython 0.11.

- mpmath has been updated to 0.17. See the corresponding mpmath release
notes at

- Added a Subs object for representing unevaluated substitutions. This
finally lets us represent derivatives evaluated at a point, i.e.,
`diff(f(x), x).subs(x, 0)` returns `Subs(Derivative(f(_x), _x), (_x,), (0,))`.
This also means that SymPy can now correctly compute the chain rule
when this functionality is required, such as with `f(g(x)).diff(x)`.

Hypergeometric functions/Meijer G-Functions

- Added classes hyper() and meijerg() to represent Hypergeometric and Meijer G-functions, respectively. They support numerical evaluation (using mpmath) and symbolic differentiation (not with respect to the parameters).

- Added an algorithm for rewriting hypergeometric and meijer g-functions in terms of more familiar, named special functions. It is accessible via the function hyperexpand(), or also via expand_func(). This algorithm recognises many elementary functions, and also complete and incomplete gamma functions, bessel functions, and error functions. It can easily be extended to handle more classes of special functions.


- Added FiniteSet class to mimic python set behavior while also interacting with existing Intervals and Unions

- FiniteSets and Intervals interact so that, for example `Interval(0, 10) - FiniteSet(0, 5)` produces `(0, 5) U (5, 10]`

- FiniteSets also handle non-numerical objects so the following is possible `{1, 2, 'one', 'two', {a, b}}`

- Added ProductSet to handle Cartesian products of sets

- Create using the `*` operator, i.e. `twodice = FiniteSet(1, 2, 3, 4, 5, 6) * FiniteSet(1, 2, 3, 4, 5, 6) or square = Interval(0, 1) * Interval(0, 1)`

- pow operator also works as expected: `R3 = Interval(-oo, oo)**3 ; (3, -5, 0) in R3 == True`

- Subtraction, union, measurement all work taking complex intersections into account.

- Added as_relational method to sets, producing boolean statements using And, Or, Eq, Lt, Gt, etc...

- Changed reduce_poly_inequalities to return unions of sets rather than lists of sets


- Added generating routines for integer partitions and binary partitions. The routine for integer partitions takes 3 arguments, the number itself, the maximum possible element allowed in the partitions generated and the maximum possible number of elements that will be in the partition. Binary partitions are characterized by containing only powers of two.

- Added generating routine for multi-set partitions. Given a multiset, the algorithm implemented will generate all possible partitions of that multi-set.

- Added generating routines for bell permutations, derangements, and involutions. A bell permutation is one in which the cycles that compose it consist of integers in a decreasing order. A derangement is a permutation such that the ith element is not at the ith position. An involution is a permutation that when multiplied by itself gives the identity permutation.

- Added generating routine for unrestricted necklaces. An unrestricted necklace is an a-ary string of n characters, each of a possible types. These have been characterized by the parameters n and k in the routine.

- Added generating routine for oriented forests. This is an implementation of algorithm S in TAOCP Vol 4A.

xyz Spin bases

- The represent, rewrite and InnerProduct logic has been improved to work between any two spin bases. This was done by utilizing the Wigner-D matrix, implemented in the WignerD class, in defining the changes between the various bases. Representing a state, i.e. `represent(JzKet(1,0), basis=Jx)`, can be used to give the vector representation of any get in any of the x/y/z bases for numerical values of j and m in the spin eigenstate. Similarly, rewriting states into different bases, i.e. `JzKet(1,0).rewrite('Jx')`, will write the states as a linear combination of elements of the given basis. Because this relies on the represent function, this only works for numerical j and m values. The inner product of two eigenstates in different bases can be evaluated, i.e. `InnerProduct(JzKet(1,0),JxKet(1,1))`. When two different bases are used, one state is rewritten into the other basis, so this requires numerical values of j and m, but innerproducts of states in the same basis can still be done symbolically.

- The `Rotation.D` and `Rotation.d` methods, representing the Wigner-D function and the Wigner small-d function, return an instance of the WignerD class, which can be evaluated with the `doit()` method to give the corresponding matrix element of the Wigner-D matrix.

Other changes

- We now use MathJax in our docs. MathJax renders LaTeX math entierly in
the browser using Javascript. This means that the math is much more
readable than the previous png math, which uses images. MathJax is
only supported on modern browsers, so LaTeX math in the docs may not
work on older browsers.

- nroots() now lets you set the precision of computations

- Added support for gmpy and mpmath's types to sympify()

- Fix some bugs with lambdify()

- Fix a bug with as_independent and non-commutative symbols.

- Fix a bug with collect (issue 2516)

- Many fixes relating to porting SymPy to Python 3. Thanks to our GSoC
student Vladimir Perić, this task is almost completed.

- Some people were retroactively added to the AUTHORS file.

- Added a solver for a special case of the Riccati equation in the ODE

- Iterated derivatives are pretty printed in a concise way.

- Fix a bug with integrating functions with multiple DiracDeltas.

- Add support for Matrix.norm() that works for Matrices (not just vectors).

- Improvements to the Groebner bases algorithm.

- Plot.saveimage now supports a StringIO outfile

- Expr.as_ordered_terms now supports non lex orderings.

- diff now canonicalizes the order of differentiation symbols. This is
so it can simplify expressions like `f(x, y).diff(x, y) - f(x,
y).diff(y, x)`. If you want to create a Derivative object without
sorting the args, you should create it explicitly with `Derivative`,
so that you will get `Derivative(f(x, y), x, y) != Derivative(f(x, y), y, x)`.
Note that internally, derivatives that can be computed are always
computed in the order that they are given in.

- Added functions `is_sequence()` and `iterable()` for determining if
something is an ordered iterable or normal iterable, respectively.

- Enabled an option in Sphinx that adds a `source` link next to each function, which links to a copy of the source code for that function.

In addition to the more noticeable changes listed above, there have been numerous other smaller additions, improvements and bug fixes in the ~300 commits in this release. See the git log for a full list of all changes. The command `git log sympy-0.7.0..sympy-0.7.1` will show all commits made between this release and the last. You can also see the issues closed since the last release [here](


The following people contributed at least one patch to this release (names are given in alphabetical order by last name). A total of 26 people contributed to this release. People with a * by their names contributed a patch for the first time for this release. Five people contributed for the first time for this release.

Thanks to everyone who contributed to this release!

* Tom Bachmann
* Ondřej Čertík
* Renato Coutinho
* Bill Flynn
* Bradley Froehle*
* Gilbert Gede
* Brian Granger
* Emma Hogan*
* Yuri Karadzhov
* Stefan Krastanov*
* Ronan Lamy
* Tomo Lazovich
* Sam Magura*
* Saptarshi Mandal
* Aaron Meurer
* Sherjil Ozair
* Mateusz Paprocki
* Vladimir Perić
* Mario Pernici
* Nicolas Pourcelot
* Min Ragan-Kelley*
* Matthew Rocklin
* Chris Smith
* Vinzent Steinberg
* Sean Vig
* Thomas Wiecki