Release Notes for 1.0 - gxyd/sympy GitHub Wiki
These are the release notes for SymPy 1.0, which has not been released yet.
This version of SymPy has been tested on Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, and PyPy.
-
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
-
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]
-
Complex Sets has been added here: sympy.sets.fancysets, use S.Complexes for singleton ComplexRegion class. PR #9463
-
solveset
now has adomain
parameter, over which it solves the equation. It ignores the assumptions on the independent variable and if no domain is specified, solves overS.Complexes
. [PR #9762] -
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]
- In
sympy.geometry
,Line.equal()
has been deprecated in favor ofLine.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 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')".
- 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
.
-
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.