SymPy Changelog

What's new in SymPy 1.0

Mar 9, 2016
  • MAJOR CHANGES:mpmath is now a hard external dependency for SymPy. sympy.mpmath will no longer work (use import mpmath). See http://docs.sympy.org/latest/install.html#mpmath for more information on how to install mpmath.
  • The galgebra Geometric Algebra module has been removed. The module is now maintained separately at https://github.com/brombo/galgebra.
  • The new solveset function is a planned replacement for solve. solve is not yet deprecated, since solveset hasn't yet fully replicated all the functionality of solve. solveset offers an improved interface to solve. See http://docs.sympy.org/latest/modules/solvers/solveset.html for more information on solveset vs. solve.
  • This will be the last version of SymPy to support Python 2.6 and 3.2. Both of these Python versions have reached end-of-life. Support for other Python versions will continue at least until they have reached end-of-life.
  • NEW FEATURES:
  • The module sympy.series.ring_series has been updated. New methods for series inversion, expansion of hyperbolic and inverse functions, etc have been added. PR #9262
  • New module sympy.series.sequences for generating finite/infinite lazily evaluated lists. [PR #9435]
  • The string representation function srepr() now displays the assumptions used to create a Symbol. For example, srepr(Symbol('x', real=True)) now returns the string "Symbol('x', real=True)" instead of merely "Symbol('x')".
  • not_empty_in function added to util.py in calculus module which finds the domain for which the FiniteSet is not-empty for a given Union of Sets. [PR #9779]
  • A new and fast method rs_series has been added for calculating series expansions. It can handle multivariate Puiseux series with symbolic coefficients. It is especially optimized for large series, with speedup over the older series method being in the range 20-1000 times. PR #9775
  • Complex Sets has been added here: sympy.sets.fancysets, use S.Complexes for singleton ComplexRegion class. PR #9463
  • GeometryEntity now subclasses from sets.Set, so sets.Intersection and sets.Union can be used with GeometryEntitys. For example Intersection(Line((-1,-1),(1,1)), Line((-1,1), (1,-1))) == FiniteSet(Point2D(0,0)).
  • New module sympy.series.fourier for computing fourier sine/cosine series. [PR #9523]
  • Linsolve: General Linear System Solver in sympy.solvers.solveset, use linsolve() for solving all types of linear systems. PR #9438
  • New assumption system is now able to read the assumptions set over Symbol object. A new handler system has been added as sympy.assumptions.satask which uses satisfiable to answer queries related to assumptions. In case the legacy ask doesn't know the answer, it falls back on satask.
  • New module sympy.series.formal for computing formal power series. [PR #9639]
  • New set class ConditionSet was implemented. [PR #9696]
  • Differential calculus Methods, like is_increasing, is_monotonic, etc were implemented in sympy.calculus.singularities in [PR #9820]
  • New module sympy.series.limitseq for finding limits of terms containing sequences. [PR #9836]
  • New module sympy/polys/subresultants_qq_zz.py :: contains various functions for computing Euclidean, Sturmian and (modified) subresultant polynomial remainder sequences in Q[x] or Z[x]. All methods are based on the recently discovered theorem by Pell and Gordon of 1917 and an extension/generalization of it of 2015. [PR #10374]
  • MINOR CHANGES:
  • limit(sin(x), x, oo) now returns AccumulationBound object instead of un-evaluated sin(oo). Implemented in [PR #10051].
  • Point is now an n-dimensional point and subclassed to Point2D and Poin3D where appropriate. Point is also now enumerable and can be indexed (e.g., x=Point(1,2,3); x[0])
  • roots_cubic will no longer raise an error when the sign of certain expressions is unknown. It will return a generally valid solution instead.
  • Relational.canonical will put a Relational into canonical form which is useful for testing whether two Relationals are trivially the same.
  • Relational.reversed gives the Relational with lhs and rhs reversed and the symbol updated accordingly (e.g. (x < 1).reversed -> 1 > x
  • Simplification of Relationals will, if the threshold for simplification is met, also return the Relational in canonical form. One of the criteria of being in canonical form is that the Number will be on the rhs. This makes writing tests a little easier so S(1) > x can be entered as 1 > x or x < 1 (the former being turned into the latter by Python).
  • boolalg functions And, Or, Implies, Xor, Equivalent are aware of Relational complements and trivial equalities, so, for example, And(x=1) will reduce to False while And(S(1)>x,x

New in SymPy 1.0 RC 1 (Feb 29, 2016)

  • Major changes:
  • mpmath is now a hard external dependency for SymPy. sympy.mpmath will no longer work (use import mpmath). See http://docs.sympy.org/latest/install.html#mpmath for more information on how to install mpmath.
  • The galgebra Geometric Algebra module has been removed. The module is now maintained separately at https://github.com/brombo/galgebra.
  • The new solveset function is a planned replacement for solve. solve is not yet deprecated, since solveset hasn't yet fully replicated all the functionality of solve. solveset offers an improved interface to solve. See http://docs.sympy.org/latest/modules/solvers/solveset.html for more information on solveset vs. solve.
  • This will be the last version of SymPy to support Python 2.6 and 3.2. Both of these Python versions have reached end-of-life. Support for other Python versions will continue at least until they have reached end-of-life.

New in SymPy 0.7.6.1 (Sep 5, 2015)

  • Fix pretty printing in the Jupyter notebook and Jupyter qtconsole for Jupyter 4.0.
  • The deprecated linearization method in the mechanics module no longer fails to execute.

New in SymPy 0.7.6 (Nov 28, 2014)

  • MAJOR CHANGES:
  • New module calculus.finite_diff for generating finite difference formulae approximating derivatives of arbitrary order on arbitrarily spaced grids.
  • New module physics.optics for symbolic computations related to optics.
  • geometry module now supports 3D geometry.
  • Support for series expansions at a point other then 0 or oo. See PR #2427.
  • Rules for the intersection of integer ImageSets were added. See PR #7587. We can now do things like {2⋅m | m ∊ ℤ} ∩ {3⋅n | n ∊ ℤ} = {6⋅t | t ∊ ℤ} and {2⋅m | m ∊ ℤ} ∩ {2⋅n + 1 | n ∊ ℤ} = ∅
  • dsolve module now supports system of ODEs including linear system of ODEs of 1st order for 2 and 3 equations and of 2nd order for 2 equations. It also supports homogeneous linear system of n equations.
  • New support for continued fractions, including iterators for partial quotients and convergents, and reducing a continued fraction to a Rational or a quadratic irrational.
  • Support for Egyptian fraction expansions, using several different algorithms.
  • Addition of generalized linearization methods to physics.mechanics.
  • Use an LRU cache by default instead of an unbounded one. See PR #7464. Control cache size by the environment variable SYMPY_CACHE_SIZE (default is 500). SYMPY_CACHE_SIZE=None restores the unbounded cache.
  • Added fastcache as an optional dependency. Requires v0.4 or newer. Control via SYMPY_CACHE_SIZE. May result in significant speedup. See PR #7737.
  • New experimental module physics.unitsystems for computation with dimensions, units and quantities gathered into systems. This opens the way to dimensional analysis and better quantity calculus. The old module physics.units will stay available until the new one reaches a mature state. See PR #2628.
  • New Complement class to represent relative complements of two sets. See Pr #7462.
  • New trigonometric functions (asec, acsc), many enhancements for other trigonometric functions (PR #7500).
  • New Contains class to represent the relation "is an element of" (see PR #7989).
  • The code generation tools (code printers, codegen, autowrap, and ufuncify) have been updated to support a wider variety of constructs, and do so in a more robust way. Major changes include added support for matrices as inputs/outputs, and more robust handling of conditional (Piecewise) statements.
  • ufuncify now uses a backend that generates actual numpy.ufuncs by default through the use of the numpy C api. This allows broadcasting on all arguments. The previous cython and f2py backends are still accessible through the use of the backend kwarg.
  • CodeGen now generates code for Octave and Matlab from SymPy expressions. This is supported by a new CodePrinter with interface octave_code. For example octave_code(Matrix([[x**2, sin(pi*x*y), ceiling(x)]])) gives the string [x.^2 sin(pi*x.*y) ceil(x)].
  • New general 3D vector package at sympy.vector. This package provides a 3D vector object with the Del, gradient, divergence, curl, and operators. It supports arbitrary rotations of Cartesian coordinate systems and arbitrary locations of points.
  • BACKWARDS COMPATIBILITY BREAKS AND DEPRECATIONS:
  • All usage of inequalities (>, >=,

New in SymPy 0.7.4.1 (Feb 14, 2014)

  • This was a small bugfix release to fix an import issue on Windows (https://github.com/sympy/sympy/issues/2681).

New in SymPy 0.7.2 (Oct 17, 2012)

  • 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.
  • Combinatorics:
  • 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.
  • Sets:
  • 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 with sympy.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/kronecker.py to sympy/functions/special/tensor_functions.py.
  • Merged the KroneckerDelta class in sympy/physics/secondquant.py with the class above.
  • The Dij class in sympy/functions/special/tensor_functions.py 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 form sol = 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/GA.py:
  • 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 in expand() 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 like a 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.5. isympy -I is the same as isympy -a -i. isympy -I makes isympy act much more like a traditional interactive computer algebra system. These both require IPython.
  • The official documentation at http://docs.sympy.org now includes an extension that automatically hooks the documentation examples in to SymPy Live.

New in SymPy 0.7.1 (Jul 31, 2011)

  • 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 http://mpmath.googlecode.com/svn/trunk/CHANGES.
  • 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).

New in SymPy 0.7.0 (Jul 1, 2011)

  • This will be the last release of SymPy to support Python 2.4. Dropping support for Python 2.4 will let us move forward with things like supporting Python 3, and will let us use things that were introduced in Python 2.5, like with-statement context managers.
  • no longer support creating matrices without brackets (see: issue 930)
  • Renamed sum() to summation() (see: 3e763a8, issues 1376, 1727). This was changed so that it no longer overrides the built-in sum(). The unevaluated summation is still called Sum().
  • Renamed abs() to Abs() (see: 64a12a4, issue 1727). This was also changed so that it no longer overrides the built-in abs(). Note that because of __abs__ magic, you can still do abs(expr) with the built-in abs(), and it will return Abs(expr).
  • Renamed max_() and min_() to now Max() and Min() (see: 99a271e, issue 2153)
  • Changed behaviour of symbols(). symbols('xyz') gives now a single symbol ('xyz'), not three ('x', 'y' and 'z') (see: f6452a8). Use symbols('x,y,z') or symbols('x y z') to get three symbols. The 'each_char' option will still work but is being deprecated.
  • Split class Basic into new classes Expr, Boolean (see: a0ab479, 635d89c). Classes that are designed to be part of standard symbolic expressions (like x**2*sin(x)) should subclass from Expr. More generic objects that do not work in symbolic expressions but still want the basic SymPy structure like .args and basic methods like .subs() should only subclass from Basic.
  • as_basic() method was renamed to as_expr() to reflect changes in the core (see: e61819d, 80dfe91)
  • Methods as_coeff_terms and as_coeff_factors were renamed to as_coeff_mul and as_coeff_add, respectively.
  • Removed the trim() function. The function is redundant with the new polys (see below). Use the cancel() function instead.

New in SymPy 0.6.7 (Mar 24, 2010)

  • fix a bug where bin/test and bin/doctest would be installed into /usr/bin
  • fix an example for recent matplotlib versions
  • some fixes for Python 2.4 and 2.5
  • try to expand integrand if integration fails
  • improved isprime() (pseudoprimes were falsely reported as being prime)
  • runtests.py prints less when testing documentation
  • ODE code clean-up and fixes
  • runtests.py is now more verbose about expected failures to avoid confusion
  • update mpmath to version 0.14
  • improvements to second quantization module and coupled cluster example
  • implement visual factorint()
  • implement symarray(): numpy array of sympy symbols
  • documentation fixes and some bugfixes

New in SymPy 0.6.5 (Jul 17, 2009)

  • Improved documentation, C code generation, solve and dsolve improvements, mpath update, a new logic module and the start of Google's Summer of Code program.

New in SymPy 0.6.4 (Apr 8, 2009)

  • robust and fast (still pure Python) multivariate factorization
  • sympy works with pickle protocol 2 (thus works in ipython parallel)
  • ./sympy test now uses our testing suite and it tests both regular tests and doctests
  • examples directory tidied up
  • more trigonometric simplifications
  • polynomial roots finding and factoring vastly improved
  • mpmath updated
  • many bugfixes (more than 200 patches since the last release)

New in SymPy 0.6.3 (Nov 20, 2008)

  • port to python2.6 (all tests pass)
  • port to jython (all tests pass except those depending on the "ast" module)
  • true division fixed (all tests pass with "-Qnew" Python option)
  • buildbot.sympy.org created, sympy is now regularly tested on python2.4, 2.5, 2.6 on both i386 and amd64 architectures.
  • py.bench -- py.test based benchmarking added
  • bin/test -- simple py.test like testing framework, without external dependencies, nice colored output
  • most limits now work
  • factorization over Z[x] greatly improved
  • Piecewise function added
  • nsimplify() implemented
  • symbols and var syntax unified
  • C code printing
  • many bugfixes

New in SymPy 0.6.2 (Oct 30, 2008)

  • user-visible changes:
  • SymPy is now 50% faster on average (cache:on) and 130% (cache:off) compared to previous release.
  • adaptive and faster evalf() (commit 1, 2, 3, 4, 5)
  • evalf: numerical summation of hypergeometric series (commit)
  • evalf: fast and accurate numerical summation (commit 1, 2, 3)
  • evalf: oscillatory quadrature (commit)
  • integrals now support variable transformation (commit)
  • we can now integrate(f(x)⋅diff(f(x),x), x) (commit 1, 2, 3)
  • we can now solve a⋅cos(x)=y (comit) and exp(x)+exp(-x)=y (commit 1, 2)
  • printing system refactored (commit 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
  • pprint: new symbol for multiply in unicode mode(x*y -> x⋅y) (commit)
  • pprint: matrices now look much better (commit) + example (commit 1, 2)
  • printing of dicts and sets are now more human-friendly (commit 1, 2, 3, 5)
  • latex: now supports sub- and superscripts in symbol names (commit)
  • RootSum.doit, now works on all roots (commit)
  • Wild can now have additional predicates (commit)
  • numpy-like zeros and ones functions (commit 1, 2, 3, 4)
  • var('x,y,z') now works (commit)
  • many bug fixes
  • changes that affected speed:
  • ((x+y+z)**50).expand() is now 4.8x faster (commit 1, 2 + following changes which all summed up)
  • big assumptions cleanup and rewrite (commit1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
  • access to all object attributes is now ~2.5 times faster (commit)
  • we try not to let 'is_commutative' to go through (slow) assumptions path (commit 1, 2)
  • Add/Mul were optimized (for some cases significantly) (commit 1, 2, 3, 4, 5, 6)
  • general cleanup:
  • isympy and sympy.interactive code were merged (commit)
  • multiple inheritance removed (NoArithMeths, NoRelMeths, RelMeths, ArithMeths are gone) (commit 1, 2, 3, 4, 5, 6)
  • .nseries() is now used as default in .series()
  • doctesting was made more robust (commit 1, 2, 3, 4, 5)