Release Notes for 1.0

Colin Macdonald edited this page Mar 10, 2016 · 22 revisions
Clone this wiki locally

These are the release notes for SymPy 1.0.

This version of SymPy has been tested on Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and PyPy.

Install SymPy with

pip install -U sympy

or if you use Anaconda

conda install sympy

Major changes

As a 1.0 release, there are some major changes, many of which are breaking. See also the "backwards compatibility breaks and deprecations" section below.

  • 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.

Backwards compatibility breaks and deprecations

  • In sympy.geometry, Line.equal() has been deprecated in favor of Line.equals().
  • The dup_inner_subresultants and dmp_inner_subresultants now only return 2 arguments instead of 3. Only those building their own routines from these very low-level functions need to be aware of this.
  • This release doesn't include copy of the mpmath library, see PR #2192. Please see new installation instructions for SymPy.
  • The release no longer includes the galgebra subumodule. This module is now maintained separately at https://github.com/brombo/galgebra. See PR #10046.

  • ClassRegistry is deprecated. It's unlikely that anybody ever used it; it is scheduled for removal for the next version of SymPy after 1.0.

  • sympy.C is deprecated and scheduled for removal after 1.0, too. For those users who followed some erroneous SymPy documentation and used C as in C.log, just import sympy and use sympy.log instead: this is compatible with SymPy before and after we remove C.
  • Q.bounded has been deprecated. Use Q.finite instead.
  • Q.infinity has been deprecated. Use Q.infinite instead.
  • Q.infinitesimal has been deprecated. Use Q.zero instead.
  • ask(Q.nonzero(non-real)) now returns False. Note that Q.nonzero is equivalent to ~Q.zero & Q.real. If you intend to find whether x is a non-zero number irrespective of the fact that x is real or not, you should use ask(~Q.zero(x)).
  • x.is_nonzero now returns True iff x is real and has a non-zero value. If you intend to find whether x is a non-zero number irrespective of the fact that x is real or not, you should use fuzzy_not(x.is_zero).
  • isprime(Float) now returns False.
  • ask(Q.integer(Float)) now returns False.
  • ask(Q.prime(Float)) now returns False.
  • ask(Q.composite(Float)) now returns False.
  • ask(Q.even(Float)) now returns False.
  • ask(Q.odd(Float)) now returns False.

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

In [37]: %timeit rs_series(cos(a+b*a**QQ(3,2)), a, 10)
100 loops, best of 3: 5.59 ms per loop

In [38]: %timeit cos(a+b*a**QQ(3,2)).series(a, 0, 10)
1 loops, best of 3: 997 ms per loop
  • 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. For e.g.:

In [7]: x = Symbol('x', positive=True)

In [8]: ask(Q.positive(x))
Out[8]: True
  • 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.

For e.g.

Earlier

>>> ask(Q.zero(x) | Q.zero(y), Q.zero(x*y))
>>> ask(Implies(Q.zero(x), Q.zero(x*y)))
>>> ask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y))

Now

>>> ask(Q.zero(x) | Q.zero(y), Q.zero(x*y))
True
>>> ask(Implies(Q.zero(x), Q.zero(x*y)))
True
>>> ask(Q.zero(x) | Q.zero(y), Q.nonzero(x*y))
False
  • 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,x>=1) will reduce to False while And(S(1)>x,x<1) reduces to x < 1. This leads to some simplifications in statistical expressions.

  • Polynomials created using ring now accept negative and fractional exponents. For e.g,

In [1]: R, x, y = ring('x, y', QQ)

In [2]: x**(-2) + y**Rational(2,3)
Out[2]: y**(2/3) + x**(-2)
  • The function used to test connectivity in Min and Max has been altered to use the weaker form of a relationship since this applies to arguments like floor(x) and x: though, in generally, we cannot say that floor(x) < x, if x is real we do know that floor(x) <= x. This allows Min(x, floor(x)) -> floor(x) without loss of generality when x is real.

  • Float has changed its default behaviour on string/int/long to use at least 15 digits of precision and to increase the precision automatically. This enables sympify('1.23456789012345678901234567890') to return a high-precision Float. It also means N('1.23456789012345678901234567890', 20) does the right thing (where it previously lost precision because an intermediate calculation had only precision 15). See Issue #8821

  • The unicode pretty printer now uses a compact single-character square root symbol for simple expressions like sqrt(x) and sqrt(17). You can disable this new behaviour with pprint(sqrt(2), use_unicode_sqrt_char=False).

  • ask(Q.finite(x), Q.infinite(x)) now returns False.

  • You can now read the definition of assumption predicates in the docs.

  • ask(Q.composite(1)) now returns False.

  • exp(expr) won't simplify automatically based on assumptions on expr. Autosimplification works for numbers and Symbol, though. You'll have to call refine on exp for simplification.

  • Idx objects can now be summation variables of Sum and Product.

  • The keyword argument of GramSchmidt was renamed from "orthog" to "orthonormal". This is because GramSchmidt always returns an orthogonal set of vectors but only if that argument is True does it return an orthonormal set of vectors.

  • RootOf now has a new subclass ComplexRootOf (abbreviated CRootOf). All currently defined functionality is in the subclass. There is a new function rootof with the same call interface as that of RootOf. It will create objects of CRootOf. New code should use rootof instead of RootOf which is planned to become an abstract class.

  • The vector module has a new function orthogonalize which applies the Gram Schmidt orthogonalization on a sequence of linearly independent vectors and returns a sequence of orthogonal (or orthonormal) vectors. The projection method has been added to compute the vector (or scalar) projection of one vector on another vector. (See https://github.com/sympy/sympy/pull/10474#)

Authors

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

Thanks to everyone who contributed to this release!

  • Luv Agarwal*
  • Sunny Aggarwal*
  • Kumar Krishna Agrawal*
  • Anton Akhmerov*
  • Alkiviadis G. Akritas
  • Gregory Ashton*
  • Boris Atamanovskiy*
  • Shipra Banga
  • Thomas Baruchel*
  • Oscar Benjamin
  • Alexander Bentkamp*
  • Adam Bloomston*
  • Leonid Blouvshtein
  • Justin Blythe*
  • Francesco Bonazzi
  • Philippe Bouafia*
  • Raoul Bourquin
  • Michael Boyle*
  • Peter Brady
  • Victor Brebenar*
  • Matthew Brett
  • Ray Cathcart*
  • Ondřej Čertík
  • Darshan Chaudhary*
  • Mathew Chong*
  • Chak-Pong Chung*
  • Jim Crist
  • Curious72*
  • Timothy Cyrus*
  • Björn Dahlgren
  • Matthew Davis*
  • Gaurav Dhingra*
  • Tanu Hari Dixit*
  • Ted Dokos*
  • Laura Domine*
  • Joachim Durchholz
  • dustyrockpyle*
  • Nguyen Truong Duy*
  • Isuru Fernando*
  • Dustin Gadal*
  • gadal*
  • Jacob Garber*
  • Guillaume Gay*
  • GitRay*
  • Harshil Goel*
  • GolimarOurHero*
  • Nicolás Guarín-Zapata*
  • Harsh Gupta
  • Michael S. Hansen*
  • Cody Herbst*
  • Thomas Hisch
  • hm
  • Guillaume Jacquenot*
  • Akshat Jain*
  • Sachin Joglekar
  • Robert Johansson
  • Lucas Jones*
  • Alec Kalinin*
  • Jack Kemp*
  • Arafat Dad Khan*
  • Sergey B Kirpichev
  • Yu Kobayashi*
  • Sebastian Koslowski*
  • Devyani Kota*
  • Yury G. Kudryashov*
  • AMiT Kumar*
  • Shashank Kumar*
  • Jayesh Lahori*
  • Tuan Manh Lai*
  • Rich LaSota*
  • Oliver Lee
  • Jerry Li*
  • Jiaxing Liang*
  • Alex Lindsay*
  • Jai Luthra*
  • Jason Ly*
  • Alistair Lynn*
  • Colin B. Macdonald
  • Meghana Madhyastha*
  • mao8*
  • Bhautik Mavani*
  • Eva Charlotte Mayer*
  • Kyle McDaniel*
  • Aaron Meurer
  • Peleg Michaeli
  • Eric Miller*
  • Sudhanshu Mishra
  • Aqnouch Mohammed*
  • Jason Moore
  • Jens Jørgen Mortensen*
  • Aaditya Nair*
  • Duane Nykamp
  • operte*
  • Renato Orsino*
  • Juan Felipe Osorio*
  • Richard Otis*
  • Asish Panda*
  • Mateusz Paprocki
  • Pastafarianist*
  • Mario Pernici
  • Luke Peterson
  • Michał Radwański*
  • Min Ragan-Kelley
  • Shekhar Prasad Rajak*
  • Venkata Ramana*
  • Timothy Reluga
  • Juha Remes*
  • Matthew Rocklin
  • Dzhelil Rufat*
  • Phil Ruffwind*
  • Ashutosh Saboo*
  • Amit Saha
  • Sampad Kumar Saha*
  • Govind Sahai*
  • Kshitij Saraogi*
  • Peter Schmidt*
  • Mridul Seth
  • Keval Shah*
  • Anish Shah*
  • Nishith Shah*
  • Lokesh Sharma*
  • Sahil Shekhawat
  • Jason Siefken*
  • Sartaj Singh*
  • Param Singh*
  • Sourav Singh*
  • Chris Smith
  • Ralf Stephan*
  • Sumith*
  • Kalevi Suominen
  • Chris Swierczewski*
  • David T*
  • Shubham Tibra*
  • Konstantin Togoi*
  • Tschijnmo TSCHAU*
  • Shivam Tyagi*
  • Prashant Tyagi*
  • Sam Tygier*
  • Kaushik Varanasi
  • Shivam Vats*
  • Sandeep Veethu*
  • Ramana Venkata
  • Kevin Ventullo*
  • Archit Verma*
  • Moo VI*
  • Sean Vig
  • Vinay*
  • Mihir Wadwekar*
  • Longqi Wang*
  • Jennifer White*
  • Chai Wah Wu
  • Gao, Xiang*
  • Guo Xingjian*
  • Michael Zingale*
  • Lukas Zorich*
  • Pablo Zubieta*