-
Notifications
You must be signed in to change notification settings - Fork 0
Release Notes for 1.0
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
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 (useimport 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 forsolve
.solve
is not yet deprecated, sincesolveset
hasn't yet fully replicated all the functionality ofsolve
.solveset
offers an improved interface tosolve
. See http://docs.sympy.org/latest/modules/solvers/solveset.html for more information onsolveset
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.
-
In
sympy.geometry
,Line.equal()
has been deprecated in favor ofLine.equals()
. -
The
dup_inner_subresultants
anddmp_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. UseQ.finite
instead. -
Q.infinity
has been deprecated. UseQ.infinite
instead. -
Q.infinitesimal
has been deprecated. UseQ.zero
instead. -
ask(Q.nonzero(non-real))
now returnsFalse
. Note thatQ.nonzero
is equivalent to~Q.zero & Q.real
. If you intend to find whetherx
is a non-zero number irrespective of the fact thatx
is real or not, you should useask(~Q.zero(x))
. -
x.is_nonzero
now returnsTrue
iffx
is real and has a non-zero value. If you intend to find whetherx
is a non-zero number irrespective of the fact thatx
is real or not, you should usefuzzy_not(x.is_zero)
. -
isprime(Float)
now returnsFalse
. -
ask(Q.integer(Float))
now returnsFalse
. -
ask(Q.prime(Float))
now returnsFalse
. -
ask(Q.composite(Float))
now returnsFalse
. -
ask(Q.even(Float))
now returnsFalse
. -
ask(Q.odd(Float))
now returnsFalse
.
-
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 toutil.py
in calculus module which finds the domain for which theFiniteSet
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 olderseries
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 fromsets.Set
, sosets.Intersection
andsets.Union
can be used withGeometryEntity
s. For exampleIntersection(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 usessatisfiable
to answer queries related to assumptions. In case the legacyask
doesn't know the answer, it falls back onsatask
.
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]
-
limit(sin(x), x, oo)
now returnsAccumulationBound
object instead of un-evaluatedsin(oo)
. Implemented in [PR #10051]. -
Point
is now an n-dimensional point and subclassed toPoint2D
andPoin3D
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 returnsFalse
. -
You can now read the definition of assumption predicates in the docs.
-
ask(Q.composite(1))
now returnsFalse
. -
exp(expr)
won't simplify automatically based on assumptions onexpr
. Autosimplification works for numbers and Symbol, though. You'll have to callrefine
onexp
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 subclassComplexRootOf
(abbreviatedCRootOf
). All currently defined functionality is in the subclass. There is a new functionrootof
with the same call interface as that ofRootOf
. It will create objects ofCRootOf
. New code should userootof
instead ofRootOf
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. Theprojection
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#)
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*