-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Release Notes for 1.5
These are the release notes for SymPy 1.5. You can also find release notes for previous versions.
SymPy 1.5 was released on 13th December 2019.
This version of SymPy has been tested on Python 2.7, 3.5, 3.6, 3.7, 3.8 and PyPy. See our Python version support policy for more information on when we plan to drop support for older Python versions.
Important: SymPy 1.5 will be the last version of SymPy to support Python 2 (with the exception of a possible 1.5.1 release if it is required). Python 2 itself is no longer supported by the core Python developers as of January 1, 2020. If you are still using Python 2, we recommend switching to Python 3. See our Python version support policy.
Install SymPy with
pip install -U sympy
or if you use Anaconda
conda install sympy
There are many changes in 1.5 (see below). Some of the highlights are
Please feel free to manually add any major changes for this release here, in addition to the automatic change listed below.
Please manually add any backwards compatibility breaks or deprecations here, in addition to the automatic listing below.
-
Deprecate
is_EmptySet
in favor ofis_empty
#16946. -
Lambda now requires a tuple rather than a list for the signature argument (non-tuple iterables are deprecated) (#17474 by @oscarbenjamin)
-
Eq(expr) now raises ValueError. Eq(expr, 0) should be used instead. (#16567 by @FrackeR011)
-
Refactory of the units module. Scale factors and dimensions are now both global and relative to single unit systems. (#17766 by @Upabjojr)
-
get_dixon_matrix() now computes only the necessary monomials for the Dixon matrix. (#17749 by @ctsiagkalis)
-
The ProductSet of no sets is no longer the empty set. Instead is the set consisting of the empty tuple. (#17557 by @oscarbenjamin)
-
Deprecated tensorhead() and tensorsymmetry() static methods. (#17124 by @drybalka)
-
Rational, irrational, transcendental and algebraic now imply finite in the assumptions system. This means that all symbols declared as rational, integer, odd etc are now automatically assumed finite. (#16597 by @oscarbenjamin)
-
In the (old) assumptions,
complex=True
now impliesfinite=True
. Note that the default assumption for Symbol iscomplex=None
, which allows for the possibility for it to be infinite. (#17699 by @oscarbenjamin and @ShubhamKJha) -
The assumptions system is changed so that only finite numbers can be considered real, positive, negative, nonnegative, nonpositive or nonzero (since nonzero implies real). This means that any symbol declared with e.g. real=True is now automatically considered finite. It also means that infinities can not be considered positive or negative since they are not real (e.g. oo.is_positive is now False). (#16666 by @oscarbenjamin and @smichr)
-
New assumptions extended_real, extended_positive etc are added that allow for positive and negative infinity. The equivalent of
Symbol('x', real=True)
in version 1.4 is nowSymbol('x', extended_real=True)
. The equivalent ofSymbol('x', negative=False)
is nowSymbol('x', extended_negative=False)
although it is usually better to useSymbol('x', nonnegative=True)
(which implies both real=True and finite=True as well). Code that previously checkedif x.is_positive
should now be written asif x.is_extended_positive
if it is intended that infinities should be allowed. (#16666 by @oscarbenjamin and @smichr) -
Numbers still compare the same as they do in Python (
Float(1) == 1
) except when they appear in an Expression, e.g.x**2.0 != x**2
(#16924 by @smichr)
-
abc
-
algebras
-
Corrected documentation for Quaternion.rotate_point(). (#17691 by @supreet11agrawal)
-
Implement division for quaternions and more flexible operations with other expressions. (#17554 by @maxencemayrand)
-
Fix a bug where multiplication of a complex number by a quaternion is performed in the wrong order. (#17551 by @maxencemayrand)
-
-
assumptions
-
refine
supportssign
function. (#17696 by @kmm555 and @sylee957) -
Fixed
refine(re(x), Q.imaginary(x))
giving python zero instead of sympy zero. (#17700 by @sylee957) -
Fixed
refine(im(x), Q.real(x))
giving python zero instead of sympy zero. (#17700 by @sylee957)
-
Improved the code in sathandlers to speed up satask. (#17379 by @ShubhamKJha)
-
Queries for properties of matrices have been fixed, like.
Q.hermitian
, etc. (#17336 by @czgdp1807) -
Performance of ask and satask is now improved. (#17144 by @rlamy and @ShubhamKJha)
-
Implemented new
cnf.py
to handle logical computations using low-level Python built-ins. (#17144 by @rlamy and @ShubhamKJha) -
add refine_re() , refine_im() (#17019 by @vighneshq)
-
Rational, irrational, transcendental and algebraic now imply finite in the assumptions system. This means that all symbols declared as rational, integer, odd etc are now automatically assumed finite. (#16597 by @oscarbenjamin)
-
Matrix diagonal assumption now matches the identity matrix and diagonalized vectors. (#16586 by @Upabjojr)
-
-
calculus
-
Improved finite difference approximation for non-equidistant discretization steps. (#17248 by @vezeli)
-
Added a function
stationary_points
to find stationary points of an expression in a given domain (#16473 by @supreet11agrawal) -
Added functions
minimum
andmaximum
to find minimum and maximum values of an expression in a given domain (#16473 by @supreet11agrawal)
-
-
codegen
-
Fortran code generation now supports complex variables by default (COMPLEX*16) (#15885 by @oscargus)
-
create_expand_pow_optimization
is now more robust (#16654 by @bjodah and @smichr) -
some fixes useful for future usages of matrix derivatives. (#16586 by @Upabjojr)
-
support for recognizing diagonalized vectors. (#16549 by @Upabjojr)
-
-
combinatorics
-
Defined
Eq
forPermutation
of same degree. (#17793 by @sylee957) -
Fixed
PermutationGroup.is_cyclic
giving wrong result for the cyclic groups created with explicitly specified generators. (#17781 by @sylee957) -
PermutationGroup.is_cyclic
automatically updates the cache foris_abelian
. (#17781 by @sylee957) -
Improved the algorithm of
PermutationGroup.is_cyclic
to detect some trivial cases like the group order of15
,35
, etc. (#17781 by @sylee957) -
Added a new predicate
is_symmetric
to test out if a permutation group is a symmetric group. (#17677 by @sylee957) -
Added a new predicate
is_alternating
to test out if a permutation group is a alternating group. (#17677 by @sylee957) -
Fixed
PermutationGroup.is_primitive()
giving an error for a group that is not transitive, instead of givingFalse
. (#17680 by @sylee957)
-
Reduce sympy import time by 20% by inlining definitions in polyhedron (#17662 by @oscarbenjamin)
-
Extended polycyclic group docstrings (#17476 by @divyanshu132)
-
added documentation for polycyclic groups (#17399 by @divyanshu132)
-
added methods to compute induced-pcgs and exp vector for pc subgroup (#17317 by @divyanshu132)
-
Permutation
will be an instance ofAtom
instead ofBasic
. (#17340 by @sylee957) -
Fixed
Permutation
raising error when used as an element ofFiniteSet
. (#17340 by @sylee957)
-
added polycyclic group class and methods (#16991 by @divyanshu132)
-
fix check_homomorphism for elements in relator not in generator (#16394 by @divyanshu132)
-
added method for Composition-Series computation (#16881 by @divyanshu132)
- Fixed
Partition
raising error whenset
s orFiniteSet
s are given as arguments. (#16887 by @smichr and @sylee957)
-
added method for Abelian Invariants computation (#16670 by @divyanshu132)
-
added functions is_cyclic and exponent (#16522 by @divyanshu132)
-
Added function for perfect group in perm_groups.py (#16375 by @divyanshu132)
-
To check solvability omit calculation of derived_series() if Order is odd (#16413 by @divyanshu132)
-
-
concrete
-
Better assumptions on
Sum
andProduct
. (#17414 by @oscarbenjamin and @oscargus) -
Empty summations leads to zero result. (#17414 by @oscarbenjamin and @oscargus)
-
Faster evaluation of certain summations and products. (#17259 by @oscargus)
-
Direct summation of
Sum
with matrices supported. (#17259 by @oscargus) -
Summation and product variables inherit properties from their limits. (#17259 by @oscargus)
-
Fixed issue where non-commutativity was not honored in
Sum.doit()
. (#17259 by @oscargus)
-
Fixed
Sum
casting dense matrix into sparse matrix. (#17241 by @sylee957) -
Sum
will cast mutable matrices into immutable variant after computation (#17241 by @sylee957)
-
Range
can be passed as limit toSum
(#16810 by @czgdp1807 and @smichr)
-
-
core
-
Catalan
now supports_eval_rewrite_as_Sum
(#17821 by @cbm755 and @czgdp1807) -
fix sympify(evaluate=False) with undefined functions (#17816 by @ethankward)
- In the (old) assumptions,
complex=True
now impliesfinite=True
. Note that the default assumption for Symbol iscomplex=None
, which allows for the possibility for it to be infinite. (#17699 by @oscarbenjamin and @ShubhamKJha)
-
Some bugs when running without the cache have been fixed. (#17704 by @oscarbenjamin)
-
test_var is using
exec
instead of callingvar
directly (#17705 by @sachin-4099) -
sympy.core.function.nfloat() now handles ExprCondPair expressions, Boolean expressions and expressions that are subclasses of MatrixBase. (#17706 by @molysgaard and @sylee957)
-
Fix
get_integer_part
for the caseexpr=S(0)
,return_ints=True
(should return0,0
instead ofNone, None, None, None
) (#17682 by @theHamsta)
-
Fixed
Mod(Pow(a, b, evaluate=False), c)
returning non-sympified integer output ifa, b, c
are numeric integers. (#17637 by @sylee957) -
Extended modular exponentiation computation for nested integer powers, so it can efficiently compute the modulus of a tetration. (#17637 by @sylee957)
-
removed match bug (#17582 by @RituRajSingh878)
-
Fixed
Eq.canonical
andNe.canonical
giving error when there are sets. (#17574 by @sylee957)
-
Fixes TypeError: _xreplace error while differentiating function of function (#17503 by @sachin-4099)
-
is_constant
(correctly) returnsNone
for cases where it earlier (incorrectly) returnedTrue
. (#17448 by @oscargus) -
Fixed issue when doing
xreplace
on an expression withRange
. (#17259 by @oscargus) -
improvements to non-commutative matching (#17223 by @anpandey)
-
More cases of relations with
frac
,ceiling
, andfloor
leads to automatic evaluation. (#17271 by @oscargus) -
frac(zoo)
no longer leads to an error. (#17271 by @oscargus) -
recusion error involving as_real_imag was removed (#17253 by @smichr)
-
negation of expressions has been optimized (#17253 by @smichr)
-
extract_multiplicatively
returns a canonical expression (#17253 by @smichr)
- powers with a base that is an Add that contains any Float coefficients are automatically factored to make the largest coefficient 1. (#16762 by @smichr)
-
Fixed a bug in the integer square root function for small inputs. (#17038 by @mdickinson)
-
improved code in Expr._lt_ and other functions. (#16956 by @ShubhamKJha)
-
added support for inheriting assumptions from symbols to Function (#17009 by @bsamseth and @smichr)
-
sympify
will now convert all dict-types input to Dict (#16963 by @smichr) -
N
now usesrational=True
which gives the desired precision when evaluating string expressions, treating floats as exact (#16963 by @smichr) -
numbers still compare the same as they do in Python (
Float(1) == 1
) except when they appear in an Expression, e.g.x**2.0 != x**2
(#16924 by @smichr)
-
The assumptions system is changed so that only finite numbers can be considered real, positive, negative, nonnegative, nonpositive or nonzero (since nonzero implies real). This means that any symbol declared with e.g. real=True is now automatically considered finite. It also means that infinities can not be considered positive or negative since they are not real (e.g. oo.is_positive is now False). (#16666 by @oscarbenjamin and @smichr)
-
New assumptions extended_real, extended_positive etc are added that allow for positive and negative infinity. The equivalent of
Symbol('x', real=True)
in version 1.4 is nowSymbol('x', extended_real=True)
. The equivalent ofSymbol('x', negative=False)
is nowSymbol('x', extended_negative=False)
although it is usually better to useSymbol('x', nonnegative=True)
(which implies both real=True and finite=True as well). Code that previously checkedif x.is_positive
should now be written asif x.is_extended_positive
if it is intended that infinities should be allowed. (#16666 by @oscarbenjamin and @smichr) -
A number of corner cases in assumptions (e.g. for Pow.is_zero, Mul.is_positive etc) have been fixed to properly take account of the possibility of infinities. (#16666 by @oscarbenjamin and @smichr)
-
Mul._combine_inverse
acts when either lhs or rhs are a Mul or Pow and will keep any I from combining with powers of -1 (#16891 by @ritesh99rakesh and @smichr) -
(-oo).as_powers_dict now returns {-1:1, oo:1} (#16891 by @ritesh99rakesh and @smichr)
-
Mod(a, b).rewrite(floor) is now defined to give
a - b*floor(a/b)
(#16864 by @smichr) -
comparison of Rational and Floats is more accurate (#16770 by @smichr)
-
subs involving Float exponents will now retain the float as in
(x**(4.*y)).subs(x**(2.0*y), z) -> z**2.0
instead ofz**2
. (#16770 by @smichr) -
equals
corrected to not make decisions based on numbers that evaluate without precision; self consistency based on solving for surds and an attempt to find minpoly are now attempted for all numberical expressions (#16770 by @smichr) -
Number can be used to instantiate oo and nan from strings (#16770 by @smichr)
-
more stringent checks on the use of underscores in numbers passed as strings to Float are now made (#16770 by @smichr)
-
checks for malformed mpf values passed to Float are now made (#16770 by @smichr)
-
numbers: Integer//d corrected for case when d is not an integer (#16840 by @smichr)
-
divmod(a, b) behavior matches Python's when arguments involve oo or nan (#16840 by @smichr)
-
Added an
eval_trigsimp
method to relational. (#16782 by @meganly) -
isinstance
for Python numeric ABCs now works for the basic SymPy number types. (#16652 by @EasyAsPi23, @parkereberry1923, and @shivanikohlii)
-
exprtools - factor_terms now factors constants out of Integrals (#16088 by @RituRajSingh878 and @smichr)
-
Rational no longer accepts nan, oo or -oo as input (#16744 by @smichr)
-
numbers - Float(oo) now gives oo; inf can be created with float(oo), if needed (#16727 by @smichr)
-
under Python 3, Number.round == round(Number) (#16608 by @smichr)
-
Number.round rounds to even on tie and does so in cases that Python misses, e.g. round(12.345,2) -> 12.35 in Python but 12.34 in SymPy whereas round(4.5) -> 4 in both. (#16608 by @smichr)
-
Integer input is now returned as Integer (#16608 by @smichr)
- added new clause
complex -> finite | infinite
in_assume_rules
in assumptions.py. (#16592 by @ShubhamKJha)
-
sympy.core.exprtools.Factors() now splits each rational factor into a seaprate numerator and denominator (#16527 by @AnimeshSinha1309)
-
removed unused parameter from process_split function (#16614 by @smellslikekeenspirit and @smichr)
-
Eq(expr) now raises ValueError. Eq(expr, 0) should be used instead. (#16567 by @FrackeR011)
-
string input to Float with underscores past the decimal and specified precision, e.g. Float('1.234_5', 12), now parsed correctly (#16437 by @shivanikohlii and @smichr)
-
changed mpf(0) in evalf_sum to None (#16402 by @Naba7 and @smichr)
-
-
crypto
- Rail fence cipher has been added to
sympy.crypto.crypto
(#17617 by @czgdp1807, @oscargus, @sylee957, and @yogesh1997)
-
Extended
rsa_public_key
andrsa_private_key
to handle any arbitrary multiprime RSA or multipower RSA case. (#17371 by @hannah-kari, @shivanikohlii, and @sylee957) -
Added an optional argument
factors
forencipher_rsa
anddecipher_rsa
, which allows to use chinese remainder theorem to compute the modulo. (#17371 by @hannah-kari, @shivanikohlii, and @sylee957) -
Added an optional argument
totient
forrsa_public_key
andrsa_private_key
, which allows to control the notation of totient to be used. (#17371 by @hannah-kari, @shivanikohlii, and @sylee957)
- corrected morse encode for 1 in
sympy/crypto/crypto.py
(#16886 by @ritesh99rakesh)
- Rail fence cipher has been added to
-
external
-
functions
-
sympy.functions.special.bessel.jn
now haseval
method (#17849 by @czgdp1807, @darknight009, and @gxyd) -
rewrite(Integral)
has been added tosympy.functions.special.elliptic_integrals
(#17806 by @cbm755 and @czgdp1807) -
Fixed maximum recursion errors and improved performance for
stirling
. (#17707 by @sachin-4099 and @sylee957) -
made digamma and trigamma into Function subclasses (#17615 by @arun-y99 and @sylee957)
-
added debug function to capture relevant information. (#17670 by @kenluck2001)
-
Fixed conversion of UndefinedFunction to sage (#13476 by @isuruf and @rwst)
-
hyper
andappellf1
supportsevaluate
keyword. (#17510 by @oscarbenjamin and @oscargus) -
Many functions now use
is_zero
to evaluate which leads to smaller expressions. (#17510 by @oscarbenjamin and @oscargus) -
Better
is_zero
check for many functions. (#17510 by @oscarbenjamin and @oscargus) -
beta
evaluates expressions if one of the arguments is1
. (#17510 by @oscarbenjamin and @oscargus) -
sinc.diff()
now returns aPiecewise
so it is possible to evaluate at0
. (#17539 by @oscargus)
- remove a bug for as_leading_term() for the gamma and factorial functions. (#17496 by @maurogaravello)
-
Lambda function signatures are generalised to allow unpacking of tuple arguments. Lambda functions have a new property
signature
to represent the "shape" of the arguments. Thevariables
property is now a flattened form of the signature. (#17474 by @oscarbenjamin) -
Lambda now requires a tuple rather than a list for the signature argument (non-tuple iterables are deprecated) (#17474 by @oscarbenjamin)
-
Fixed
H0=Heaviside(0)
making the function to haveHeaviside(0)
as a second argument. (#16612 by @Sc0rpi0n101 and @sylee957) -
Rewriting
Heaviside
tosign
will respect the definition ofHeaviside(0)
. Users should manually setH0=1/2
or substitute theHeaviside(0)
into a definition to yield previous result. (#16612 by @Sc0rpi0n101 and @sylee957) -
Rewriting
sign
toHeaviside
will automatically setH0=1/2
forHeaviside
(#16612 by @Sc0rpi0n101 and @sylee957)
-
atan2(0, x)
is now correct even ifx
is complex. (#17278 by @oscargus) -
Piecewise
conditions withre
orim
are no longer broken. (#17278 by @oscargus) -
Added missing 'return' keyword in sympy.functions.atan2._eval_evalf (#17469 by @Geektrovert)
-
Abs(x) for imaginary x can now rewrite as Piecewise. (#17439 by @oscarbenjamin)
- remove a bug for
as_leading_term()
for exponential functions. (#17447 by @maurogaravello)
-
Added Marcum Q-function. (#17078 by @ethankward)
-
atanh(tanh(x)), acosh(cosh(x)) and asinh(sinh(x)) are automatically evaluated (#17429 by @ethankward)
-
floor and ceiling can be evaluated automatically as positive or negative (#17313 by @ethankward)
-
Inequalities with floor and ceiling and integers are automatically simplified (#17313 by @ethankward)
-
Piecewise
with identical conditions bug fixed. (#17432 by @oscargus) -
Added range assumption for the indices of KroneckerDelta. (#17433 by @Upabjojr)
-
exp and log now expand Product and Sum objects. (#17412 by @Upabjojr)
-
Negative index Laguerre, Legrande, and Chebyshev U polynomials are handled better. (#17010 by @oscargus)
-
Abs will now separate numeric numerator or denominator in a fraction so Abs(2/x) -> 2/Abs(x) (#17307 by @oscargus and @smichr)
-
Added automatic evaluation for
log(exp())
. (#17301 by @gschintgen) -
log() now recognizes algebraic values having a complex argument of
I*n*pi/3
,I*n*pi/4
,I*n*pi/5
,I*n*pi/6
,I*n*pi/8
,I*n*pi/10
orI*n*pi/12
(#17201 by @gschintgen and @smichr) -
KroneckerDelta can be rewritten as Piecewise. (#17215 by @ethankward)
-
Piecewise can be rewritten as KroneckerDelta (#17215 by @ethankward)
-
exp()
now reduces its argument mod2*pi*I
. (#17251 by @gschintgen) -
Improve presentation of some tan, cot values for n * pi/5, n * pi/8, n * pi/10. (#17196 by @gschintgen)
-
Make asec, acsc recognize exact values resulting in a rational multiple of pi. (#17196 by @gschintgen)
-
Make asin, acos, atan, acot recognize some additional exact values. (#17196 by @gschintgen)
-
RisingFactorial(x, k) where k is a noninteger, x is a negative integer automatically evaluates to 0. (#17173 by @ethankward)
-
Changed Piecewise.doit() to avoid recursively evaluating itself. (#17188 by @Pristine-Cat and @smichr)
-
acos
with purely imaginary input is automatically rewritten toasin
. (#17154 by @oscargus)
-
Added
multigamma
function insympy/functions/special/gamma_functions.py
(#16843 by @ritesh99rakesh) -
log bug fixed which generated zoo when a Rational arg contained a power of the Integer base (#17150 by @smichr and @sympy)
-
acsc(0) is automatically evaluated (#17147 by @ethankward)
-
Contains
allowed inPiecewise
(#17115 by @czgdp1807 and @smichr) -
Fixed issue with
as_real_imag()
for Fresnel integrals. (#16996 by @oscargus) -
Added case for direct evaluation of Gegenbauer polynomials. (#16996 by @oscargus)
-
Associated Laguerre polynomials can now be rewritten as (explicit) polynomials. (#16996 by @oscargus)
-
Corrected error handling of Fibonacci polynomials. (#17012 by @oscargus)
-
nT function should provide faster partition counting for integers (#16459 by @abhinav28071999 and @smichr)
-
nT always returns Integer for integer input (#16459 by @abhinav28071999 and @smichr)
-
fixed a bug with eval_rewrite_as_atan (#16385 by @OrestisVaggelis and @oscarbenjamin)
-
special: fix _add_bsplines (#16359 by @Corwinpro)
-
-
geometry
-
wrote excenters method to Polygon class. (#13363 by @czgdp1807 and @Newman101)
-
Multiplying a factor by point's coordinates has been implemented. (#17655 by @drnextgis)
-
added methods in the polygon class to calculate section modulus, polar second moment of area and first moment of area of a two-dimensional polygon (#17153 by @ishanaj)
-
added methods in the ellipse class to calculate section modulus and polar second moment of area of a two-dimensional ellipse (#17153 by @ishanaj)
-
Added a method
cut_section()
for the Polygon class which returns a segment of the polygon that lies above the given intersecting line. (#17001 by @ishanaj)
-
ellipse.is_tangent
is more careful about deciding if a line that intersects at two points is not tangent -- it is possible to calculate an intersection as two point that are symbolically different but actually represent the same point in which case the line is tangent (#16770 by @smichr) -
Point.affine_rank
now uses aniszerofunc
that assumes numbers less than 1e-12 are zero during rank calculation. (#16770 by @smichr) -
Added Director Circle Feature For Ellipse (#16560 by @iamrajiv)
- improved response time of 2D Line/Segement interactions and Segment containment of Point (#16668 by @smichr)
-
Plane.distance
can now return the minimum distance w.r.t to aSegment
or aRay
(#16637 by @czgdp1807 and @sidhantnagpal) -
Fixed a bug in
Plane.intersection
which was leading to erroneous intersection points (#16637 by @czgdp1807 and @sidhantnagpal)
- Fix
p_parameter
for Parabolas with symbolic variables (#16601 by @jsbarbosa and @sidhantnagpal)
-
-
integrals
-
Added some documentation on the integration internals to the integration documentation in Sphinx. (#17698 by @asmeurer)
-
Added an improvement to gather more information to enhance debugging functionality of the integration module. (#17670 by @kenluck2001)
-
Refactory of RUBI in order to allow generating a decision tree. (#17614 by @Upabjojr)
-
Fixed
integrate
bug which raised an error instead of returning an unevaluated Integral (#17489 by @sachin-4099) -
Integrals with abs, conjugate, re, im, DiracDelta, or sign will not use the
heurisch
step by default. (#17272 by @oscargus) -
added rules in manualintegrate to cover all cases of rational functions with quadratic denominator (#17359 by @miguelmarco)
-
Integration with complex constants works better in some cases. (#17045 by @oscargus)
- assumptions based upon definite integration limits are automatically applied to integration variables (#17093 by @smichr)
-
correcting the documentation link to SymPy's Wiki. (#17101 by @Upabjojr)
-
Symbolic bounds do not cause errors when doing variable transformations. (#16947 by @oscargus)
-
rubi.utility_function
,exp
is renamed torubi_exp
in rubi.py file (#16548 by @Shekharrajak and @Upabjojr) -
fixing connector to MatchPy to new MatchPy version. (#16472 by @asmeurer and @Upabjojr)
-
-
interactive
-
Guess the best foreground color for LaTeX rendering if
None
(new default) is given ininit_printing
. (#17244 by @oscargus) -
init_printing(use_latex='svg')
renders an svg which can be useful for some shells. (#17290 by @oscargus) -
The LaTeX output can be scaled by using
scale
ininit_printing
. (#17277 by @oscargus)
-
-
logic
-
And/Or will supress errors if evaluation of other args during subs gives False/True (#17534 by @smichr)
-
Added pycosat as an optional dependency to improve performance while solving SAT problems. (#17440 by @certik, @debugger22, and @ShubhamKJha)
-
bool_map
detects different betweenXor(*a)
and~Xor(*a)
whenlen(a) > 2
(#17176 by @smichr and @sympy)
-
And
can be rewritten asNor
,Or
asNand
, andXor
as eitherOr
orAnd
. (#16194 by @oscargus and @shubhamabhang77)
-
-
matrices
- fix the problem that Matrix.elementary_row_op() could judge whether col/row is within the valid range wrongly. (#17831 by @Hou-Rui)
-
Fixed
Matrix.gauss_jordan_solve
raisingShapeError
for immutable matrices. (#17769 by @sylee957) -
Fixed
Add(ZeroMatrix(2, 2), ZeroMatrix(2, 2))
or other similar expressions givingS.Zero
instead ofZeroMatrix
. (#17630 by @sylee957) -
Fixed
Matrix.orthogonalize
andMatrix.QRdecomposition
giving wrong result for complex vectors because of using dot without conjugation. (#17589 by @sylee957)
-
HadamardProduct.as_explicit
now supports matrix to matrix power. (#16508 by @sylee957) -
Added missing doc for
HadamardProduct
andHadamardPower
. (#16508 by @sylee957) -
Make it clear in the FunctionMatrix docstring that it works with symbolic shapes (#17468 by @asmeurer)
-
ZeroMatrix
,OneMatrix
,Identity
,DFT
,FuncMatrix
will giveValueError
when invalid dimensions (non-integers or negative or non-real) are given. (#17314 by @sylee957) -
FuncMatrix
will only accept SymPyLambda
or a string form of pythonlambda
(#17314 by @sylee957) -
Added
Matrix.log
for computing matrix logarithm. (#17221 by @sylee957)
-
Fixed a missing import when calculating smith normal form. (#17436 by @isuruf)
-
Fixing problems related to derivation of matrix expressions by scalars. (#17413 by @Upabjojr)
-
Fixing bug preventing the simplification of ElementwiseApplyFunc. (#17417 by @Upabjojr)
-
added tests for current matmul failure and inoptimal cases (#17353 by @Pristine-Cat)
-
Fixed
SparseMatrix.diagonal_solve
only solving the first column of the RHS matrix. (#17254 by @sylee957) -
Fixed
SparseMatrix.upper_triangular_solve
andSparseMatrix.lower_triangular_solve
only solving the first column of the RHS matrix. (#17254 by @sylee957) -
Fixed
SparseMatrix.upper_triangular_solve
andSparseMatrix.lower_triangular_solve
not working if RHS is an immutable matrix. (#17254 by @sylee957) -
Transposing
BlockDiagMatrix
will returnBlockDiagMatrix
instead ofBlockMatrix
(#17297 by @sylee957) -
Fixed
block_collapse
castingBlockDiagMatrix
toBlockMatrix
unnecessarily when matrix-scalar multiplication is distributed, inside anInverse
orTranspose
(#17297 by @sylee957) -
Fixed
block_collapse
givingAttributeError
with sparse matrices. (#17296 by @sylee957) -
Fixed symbolic
DotProduct
multiplied with matrices giving error. (#17275 by @sylee957) -
DotProduct
is properly considered a scalar. (#17275 by @sylee957)
-
Fixed MatrixArithmetic.pow() to handle neg/num cases correctly. (#17206 by @Pristine-Cat)
-
Added usage of
_matrix_pow_by_jordan_blocks()
inMatPow.doit()
where aplicable. (#17179 by @Pristine-Cat)
-
Added properties
is_positive_definite
,is_positive_semidefinite
,is_negative_definite
,is_negative_semidefinite
,is_indefinite
for testing out definitiveness of matrix (#16819 by @sylee957) -
Mutable attributes zero and one added to replace hardcoded S.Zero and S.One (#16898 by @jksuom)
-
Matrix.pinv
will use rank decomposition by default. (#16305 by @smichr and @sylee957) -
Added
method
option forMatrix.pinv
(#16305 by @smichr and @sylee957) -
MatAdd
andMatMul
will useGenericZeroMatrix
andGenericIdentity
foridentity
(#16853 by @sylee957) -
Fix
AttributeError
raised whileTranspose
is applied for matrix-scalar multiplication containing symbolic scalar. (#16812 by @sylee957) -
Improved canonicalization for
HadamardProduct
(#16685 by @sylee957 and @Upabjojr) -
Deleted
rules
frommatrices.expressions.hadamard
(#16685 by @sylee957 and @Upabjojr)
-
Allow matrix expressions to be derived by a scalar. (#16693 by @Upabjojr)
-
Added LaTeX and Pretty printers for elementwise function applications. (#16675 by @sylee957 and @Upabjojr)
-
Introduction of
OneMatrix
, a matrix symbol representing matrices of only 1 entries. (#16676 by @Upabjojr) -
Add support for derivatives of Hadamard products and powers. (#16673 by @Upabjojr)
-
added support for derivative of matrix scalar raised to non-integer powers. (#16659 by @Sc0rpi0n101 and @Upabjojr)
-
Matrix expressions expressed as summations will now have differently named dummy variables. (#16647 by @Upabjojr)
-
use objects in sympy/codegen/array_utils.py for matrix expression derivatives. (#16630 by @Upabjojr)
-
banded
added to sparsetools.py as a helper to create a banded matrices (#16452 by @smichr) -
matrices comprised of blocks that are not size-symmetry are detected in BlockMatrix and can be handled with Matrix (#16462 by @smichr)
-
Matrix creation involving matrices expands the matrices unless evaluate is False (#16462 by @smichr)
- improvements to matrix derivatives, some refactory of the matrix derivative algorithm. (#16544 by @Upabjojr)
- Derivatives of elementwise function applications on matrices are now supported. (#16442 by @Upabjojr)
-
Matrix.
__mod__
is now defined soones(2) % 2 -> ones(2)
(#16454 by @smichr) -
method
diagonal
extracts the kth diagonal likerow
andcol
extract the kth row or column. (#16454 by @smichr)
-
matrix creation detects singleton lists in matrices so Matrix([1, [2]]) now raises an error (#16341 by @smichr)
-
diag matrix shape defaults to square if only rows or cols is given (#16341 by @smichr)
-
diag unpacking of lists (conversion of single lists to matrices) can be controlled with keyword
unpack
; dense.diag defaults to True while Matrix.diag (common.diag) defaults to False;Matrix.diag(*[1, 2, 3]) == Matrix.diag([1, 2, 3], unpack=True)
) (#16341 by @smichr) -
diag accepts variable-length rows if keyword
strict
is set to False (#16341 by @smichr) -
SparseMatrix will accept a list of lists with or without size specified (#16343 by @smichr)
-
SparseMatrix values in the instantiation dictionary can now be matrices (or lists that are interpreted like matrices but do not need to contain row x col elements, i.e. a list of ragged lists is acceptable) (#16343 by @smichr)
-
ntheory
- Fixed a bug in factorint() causing wrong answers for certain integers. (#17720 by @PengningChao)
-
clarify
perfect_power
behavior in docstring and make it strict when candidates are given: return False if exponent of power not in candidates (#17095 by @smichr) -
continued_fraction
now imports as a function instead of a module; the new function is a high-level interface tocontinued_fraction_periodic
that allows the input of valid expressions like(2 - 3*sqrt(5))/7 -> [-1, 3, [18, 2, 1, 1, 4, 10, 4, 1, 1, 2]]
(#16923 by @smichr) -
continued_fraction_periodic
no longer returns continued fractions with more than negative number (#16923 by @smichr)
-
parsing
-
Added a new Parser to parse C source code. (#16974 by @Sc0rpi0n101)
-
Added a new Parser for parsing Fortran source code (#17356 by @Sc0rpi0n101)
-
Added SymPyExpression to handle parsed SymPy expressions (#17356 by @Sc0rpi0n101)
-
Fixed
parse_expr
not correctly parsing numeric strings to numbers ifsplit_symbols
is configured intransformations
(#16632 by @smichr and @sylee957) -
more user-friendly errors are raised when bad input is given to
parse_expr
(#16632 by @smichr and @sylee957) -
split_symbols
transformation will recognize multi-digit integers (#16632 by @smichr and @sylee957)
-
-
physics.continuum_mechanics
-
a new method
draw()
has been added in the beam module which gives functionality to draw the beam diagrams using matplotlib (#17345 by @ishanaj) -
Beam class now accepts Geometry object representing the shape of the cross-section (#17055 by @ishanaj)
- added a new function polar_moment() (#16439 by @arooshiverma and @oscargus)
-
-
physics.mechanics
-
parallel_axis
method has been added toParticle
andRigidBody
. (#17783 by @czgdp1807 and @moorepants) -
fix typo in physics documentation code snippet (#17320 by @JosephRedfern)
-
Replaces qdots with generalized speeds in force-list (#16700 by @VirtualAcoustics)
-
-
physics.optics
-
added module
polarization
. (#17818 by @oscarlazoarjona) -
modified two functions in
physics.optics.utils
, namely:refraction_angle()
anddeviation()
so they now also accept an angle of incidence. This is useful if the user wants to work the angles instead of inputting ray-like objects. (#16512 by @Trave11er)
-
-
physics.quantum
- Pow expressions handled in Commutator expansion (#16423 by @versusvoid)
-
physics.secondquant
-
physics.units
-
Added Gaussian CGS units to the Units module. (#17842 by @Upabjojr)
-
Refactory of the units module. Scale factors and dimensions are now both global and relative to single unit systems. (#17766 by @Upabjojr)
-
Updated the values of physical constants (such as Planck's constant) to reflect the current 2018 CODATA values. (#17273 by @CameronKing)
-
More physical constant are derived from their fundamental definitions. (#17273 by @CameronKing)
-
-
physics.vector
- fix ReferenceFrame
_w_diff_dcm
method (#16828 by @zhouzq-thu)
- fix ReferenceFrame
-
physics.wigner
- added functions
wigner_d_small
andwigner_d
. (#12767 by @czgdp1807 and @oscarlazoarjona)
- added functions
-
plotting
-
Fixed
plot_implicit
for composite boolean regions like(y > 2) & (y > x)
(#17711 by @sylee957) -
textplot
correctly handles the singularities and imaginary values encountered in plot (#17727 by @sylee957) -
Fixed misaligned x-axes labeling in
textplot
(#17727 by @sylee957) -
functionalities of adding markers, annotations, rectangles, filling color in a plot have been added to the matplotlib backend of the plotting module (#17345 by @ishanaj)
-
Plotting of
Piecewise
withEq
orNe
works. (#17460 by @oscargus) -
Plots with fractional exponents and negative base values works again. (#17409 by @oscargus)
-
Fixed
ValueError
raising when usingPlot.show()
with Matplotlib backend. (#17352 by @oscargus) -
Fixed error for
plot
,plot3d
,plot_parametric
,plot3d_parametric_line
,plot3d_parametric_surface
when showing empty plot using Matplotlib backend. (#17352 by @oscargus) -
Fixed issue with x-axis log scale range. (#16796 by @oscargus)
-
-
polys
-
get_dixon_matrix() now computes only the necessary monomials for the Dixon matrix. (#17749 by @ctsiagkalis)
-
The zero roots are added after non-trivial roots have been translated (#17200 by @aaditkamat)
-
itermonomials is now a generator. (#16561 by @ctsiagkalis)
-
itermonomials now accepts (besides the list of variables) either a list of degrees (one degree for each variable) or an integer (same degree for all the variables) for either the
min_degrees
andmax_degrees
parameters.min_degrees
can also be omitted, in which case it corresponds to a 0 (single int) or a list of 0's. (#16561 by @ctsiagkalis) -
corrects
itermonomials
by replacing max with sum (#16657 by @czgdp1807)
-
-
printing
-
Fixed a bug with rational number set latex printing (#17984 by @jgulian)
-
combining accents do no longer count in pretty printing leading to that right hand brackets are not messed up (#17717 by @czgdp1807, @gkorepanov, and @oscargus)
-
Added constants
S.Exp1
,S.GoldenRatio
,S.EulerGamma
,S.Catalan
,S.Nan
,S.Infinity
andS.NegativeInfinity
formpmath
printer. (#17815 by @sylee957) -
Added constants
S.Exp1
,S.Pi
,S.EulerGamma
,S.Nan
,S.Infinity
andS.NegativeInfinity
fornumpy
printer. (#17815 by @sylee957) -
Added constants
S.GoldenRatio
,S.Pi
forscipy
printer. (#17815 by @sylee957) -
Fixed
scipy
printer printing the wrong constant forS.Exp1
. (#17815 by @sylee957) -
Added
tensorflow_version
option for tensorflow code printers. (#17103 by @czgdp1807 and @sylee957) -
Fixed lambdify for tensorflow version >= 2. (#17103 by @czgdp1807 and @sylee957)
- Printing of multivariate ImageSets is fixed. (#17593 by @oscarbenjamin)
-
numexpr
now supportsPiecewise
(#17673 by @czgdp1807 and @louisabraham) -
print_gtk
now works with python3. (#14202 by @oscargus and @TitanSnow)
-
Fixed parenthesis for set operators
Union
,Intersection
,SymmetricDifference
,Complement
, andProductSet
for mathml presentation printer. (#17561 by @sylee957)
-
Fixed printing Permutation with srepr (#17662 by @oscarbenjamin)
-
rust_code
now executes correct method forMatrixSymbol
elements. (#17635 by @czgdp1807) -
Added a Maple code printer. (#17266 by @stevenleeS0ht and @sylee957)
-
Fixed missing parenthesis for set operators
Union
,Intersection
,Complement
,SymmetricDifference
,ProductSet
(#17538 by @sylee957) -
Setting
allow_unknown_functions=True
will not attempt to print in the unsupported form if the rewriting scheme exists. (#17501 by @sylee957) -
Fixed
pycode(beta(x, y), allow_unknown_functions=True)
printing unsupported function in pythonmath
module even if the rewriting scheme exists. (#17501 by @sylee957)
-
str
now gives more copy-paste-friendly code. (#17295 by @oscargus and @Upabjojr) -
Pretty printing of
HadamardPower
. (#17295 by @oscargus and @Upabjojr) -
Printer for ElementwiseApplyFunc now uses circle before parenthesis (#17416 by @Upabjojr)
-
Add parenthesis before circ in LaTeX printer for Hadamard powers when the precedence of the exponent is lower than the precedence of multiplication. (#17423 by @Upabjojr)
-
Added SciPy
lambdify
support forfresnelc
,fresnels
,lowergamma
anduppergamma
. (#17394 by @oscargus) -
Added Python code generation support for
beta
(with automatic rewrite togamma
if required). (#17394 by @oscargus)
-
Fixed LaTeX printer not printing the second argument of
LambertW
. (#17398 by @sylee957) -
Fixed Mathematica printer giving error when printing
LambertW
with 2 arguments. (#17398 by @sylee957)
-
Added MathML content printing of
Piecewise
. (#17294 by @gbernardino and @oscargus) -
LaTeX printing of non-trivial derivative counts fixed. (#17298 by @oscargus)
- Mathematica code printer will put an additional parenthesis to the printed result of
TribonacciConstant
to fix the precedence control. (#17291 by @sylee957)
-
Fixed LaTeX printing of
Derivative
when the derivation variable has a superscript. (#17288 by @oscargus) -
Added LaTeX, pretty and MathML presentation printing of
stieltjes
and Mathieu functions. (#17074 by @oscargus) -
Improved printing of integer polynomials (
bell(n, x)
etc) for pretty and MathML presentation printers. (#17074 by @oscargus) -
Added MathML presentation printing of
euler
. (#17074 by @oscargus) -
NumPy printer now handles identity matrices (#17022 by @anpandey)
- added relational operator printing for various languages (#17239 by @ritesh99rakesh)
-
Added support for a number of functions and constants to the MathML content printer. (#17194 by @oscargus)
-
erf2
andLi
are printed usingerf
andli
, respectively, if the latter is supported, but not the former for all code printers. (#17080 by @oscargus) -
Better
LambertW
printing for LaTeX, pretty, and MathML presentation. (#17080 by @oscargus) -
Mathematica printing for many special functions added. (#17080 by @oscargus)
-
Some functions added to Octave printer. (#17080 by @oscargus)
-
Some functions added to pretty printer. (#17080 by @oscargus)
-
New option decimal_separator added to LaTeX printer which applies to floats and also affects lists, tuples, and sets. (#16711 by @rimibis and @rimibiswas)
-
Added a new argument for latex in latex.py for decimal separator and list, set, and tuple element separator (#16711 by @rimibis and @rimibiswas)
-
print_float in latex.py now has a check to determine what type of decimal separator to print out (#16711 by @rimibis and @rimibiswas)
-
_print in printer.py now has a check to determine what type of decimal separator to print out (#16711 by @rimibis and @rimibiswas)
-
Add support for optimizations to numpy printer. (#17041 by @anpandey)
-
The numpy and octave printers print matrix expressions like
A**-1*x
using asolve
. (#17041 by @anpandey)
-
Added an option
standard
for python code printers to print rational numbers or print statement with python2 semantics. (May be removed after dropping python 2 compatibility) (#16901 by @sylee957) -
MpmathPrinter
will print rational numbers likempf(1)/mpf(2)
(#16901 by @sylee957) -
python code printer will print
sqrt
asmath.sqrt
(#16901 by @sylee957) -
NumPyPrinter
will print negative integer powers as negative floating point powers, likex**(-1.0)
which had causedValueError
. And may also resolve some relevant issues inlambdify
(#16901 by @sylee957)
-
Added MathML presentation printing of some constants and spaces. (#17075 by @oscargus)
-
Added MathML presentation printing of
Contains
andDagger
. (#17075 by @oscargus) -
Mathematica printing of special polynomials. (#17023 by @oscargus)
-
Mathematica printing of missing trigonometric functions. (#17023 by @oscargus)
-
Corrected LaTeX printing of Bell, Bernoulli, Fibonacci, and Tribonacci polynomials. (#17012 by @oscargus)
-
fixed bug of display of parentheses in
mathml
(#16985 by @pekochun) -
Mathematica printing support for numerous functions related to special integrals and factorials added. (#16921 by @oscargus)
-
Added printing of OneMatrix to latex, str, pretty, and MathML presentation printers. (#16906 by @oscargus and @smichr)
- dot should be faster at generating output and now respects commutativity (#16781 by @Shekharrajak, @smichr, and @sylee957)
-
New function
multiline_latex
which simplifies generating code for long expressions (#15944 by @oscargus) -
Theano printing now supports complex variables, conjugates and constant functions (#15885 by @oscargus)
-
Added printing of
UniversalSet()
for LaTeX ,pretty, MathML presentation, and str printers. (#16631 by @oscargus) -
added LaTeX printers for class
OneMatrix
. (#16692 by @Upabjojr)
-
-
series
-
Added
FiniteFormalPowerSeries
class insympy.series.formal
(#17134 by @ArighnaIITG) -
moved implementation of bidirectional limit from limit() to Limit.doit() (#17326 by @Pristine-Cat)
-
Implemented
aseries
function insympy.core.expr
andsympy.series.aseries
. (#17167 by @ArighnaIITG) -
Implemented composition and inversion operation of two formal power series in
sympy.series.formal
(#17064 by @ArighnaIITG) -
Implemented convolution operation of two formal power series in
sympy.series.formal
(#17017 by @ArighnaIITG) -
Added support for formal power series with symbolic
x**n
terms insympy.series.formal
(#16869 by @ArighnaIITG) -
series.py (#16799 by @Naba7, @oscarbenjamin, and @smichr)
-
sympy.fps returns a
Formal Power Series
object forpolynomial
functions. (#16943 by @ArighnaIITG) -
Added expand method for SeqFormula (#16368 by @pragyanmehrotra)
-
-
sets
-
FiniteSets print explicitly as e.g.
FiniteSet(0, 1)
understr
andrepr
. (#17845 by @oscarbenjamin) -
EmptySet (as imported from sympy) is now the singleton instance of the empty set rather than the class. (#17839 by @isuruf, @Naba7, and @oscarbenjamin)
-
ImageSet can now represent sets of nested tuples and can have base sets that are nested ProductSets without flattening. (#17593 by @oscarbenjamin)
-
The definition of ImageSet is now tightened so that in
ImageSet(lamda, S1, S2, ...)
the number of set arguments must match the number of arguments accepted by the lamda function. AlsoImageSet
no longer implicitly combines arguments into a flattenedProductSet
soImageSet(lamda, S1*S2, S3)
is not equivalent toImageSet(lamda, S1, S2, S2)
. This means thatImageSet
is well defined in all cases including when mixing sets of tuples andProductSet
as base sets: the setImageSet(lamda, S1, S2, ...)
always means that set oflamda(x1, x2, ...)
wherex1
inS1
, etc. (#17593 by @oscarbenjamin) -
ImageSet now has attributes base_sets which returns a list of sets and base_pset which returns a ProductSet of the basesets. In the new tighter definition of
ImageSet
these are more useful than thebase_set
attribute. (#17593 by @oscarbenjamin)
-
Added
PowerSet
for representing symbolic power set. (#17581 by @sylee957) -
Fixed table-of-contents in the set documentation. (#17581 by @sylee957)
-
Added missing documentation about
SymmetricDifference
,ConditionSet
. (#17581 by @sylee957)
- Cleaned up inheritance scheme for ComplexRegion and Complexes. (#17519 by @oscarbenjamin)
-
Implemented iteration methods for
Complement
,SymmetricDifference
. (#17584 by @sylee957) -
Fixed
is_iterable
forComplement
andSymmetricDifference
to giveTrue
if the predicate can easily be determined. (#17584 by @sylee957)
-
ProductSet no longer automatically flattens its arguments but provides a flatten() method instead. This also means that the Cartesian product of sets is not associative. (#17557 by @oscarbenjamin)
-
The ProductSet of no sets is no longer the empty set. Instead is the set consisting of the empty tuple. (#17557 by @oscarbenjamin)
-
Passing an iterable argument to ProductSet is now deprecated. An iterable should be unpacked when passed to ProductSet. (#17557 by @oscarbenjamin)
-
Fixed printing of unary ProductSets (#17557 by @oscarbenjamin)
-
ProductSet.as_relational always returns relationals (#17557 by @oscarbenjamin)
-
Equalities involving Tuples can now evaluate and some bugs for equalities involving FiniteSets are fixed. (#17557 by @oscarbenjamin)
-
Improved handling of intersections involving FiniteSets. Evaluation will only occur when it is generally valid and the result will always return as an Intersection when not fully evaluated. (#17526 by @oscarbenjamin)
-
Set.is_subset now returns True, False or None (previously an Intersection was returned instead of None). (#17526 by @oscarbenjamin)
-
FiniteSet._eval_Eq is fixed so that it doesn't evaluate when not possible due to arbitrary symbols in the elements (e.g. Eq(FiniteSet(x, y), FiniteSet(x))). (#17526 by @oscarbenjamin)
-
all integers can be represented with
Range(-oo, oo)
; for this Range, the step must be 1 (#17512 by @smichr) -
Range(range(3))
should now be writtensympify(range(3))
(#17512 by @smichr) -
Intervals starting with oo or ending with -oo return an empty set (#17490 by @smichr and @Soniyanayak51)
-
Added
is_empty
which returnsTrue
,False
orNone
and deprecatedis_EmptySet
. (#17491 by @gschintgen) -
as_relational
has been added toRange
. (#17145 by @czgdp1807)
-
Naturals0.intersect(Range) is handled correctly now (#16995 by @smichr and @sympy)
-
processing of arguments of an intersection is more canonical (#16988 by @smichr)
-
interactions between Z, N, N0 and R is improved (#16896 by @smichr)
-
containment checks improved, especially for interactions between Integer-types (#16864 by @smichr)
-
imageset
simplifies to Range when possible (#16864 by @smichr) -
imageset
over integers does not introduce symbolicMod
(#16864 by @smichr) -
fancyset Range recognizes null ranges when start or stop is infinite and step is wrong sign (#16862 by @smichr)
-
bug fix in ImageSet contains method makes it more robust for multivariate cases (#16862 by @smichr)
-
arguments of null Range(0, 0, 1) are now Integers (solves printing problem) (#16820 by @ritesh99rakesh)
-
-
simplify
-
The result after
doit()
is only returned if it is smaller than beforedoit()
. (#17259 by @oscargus) -
The content of a
Piecewise
is simplified even when only parts of the expression is aPiecewise
. (#17259 by @oscargus) -
removed hyperexpand dependance on return from from matrix multiplication (#17353 by @Pristine-Cat)
-
collect_abs
is added to radsimp to put mutliple Abs in a term under a single Abs (#17307 by @oscargus and @smichr) -
separatevars
will now separate args of Abs when they are separable (#17307 by @oscargus and @smichr) -
simplify attempts to simplify expressions containing KroneckerDelta. (#17215 by @ethankward)
-
simplify
will now apply doit to an expression by default; this can be disabled by passingdoit=False
(#17164 by @debugger22 and @smichr)
-
simplify will now factor constants out of an Integral (#16088 by @RituRajSingh878 and @smichr)
-
Improves the code for posify (#16450 by @ShubhamKJha)
-
logcombine: log(x) + log(2) will now combine without the use of
force
(#16429 by @jmig5776 and @smichr)
-
-
solvers
-
linear_coeffs gives no longer raises when expr has no symbols of interest (#17814 by @sachin-4099)
-
Fixes NotImplementedError for an equation containing absolute value in Python 3 (#17767 by @sachin-4099)
-
Fixed
linsolve
raising errors forImmutableMatrix
. (#17769 by @sylee957) -
added method in dsolve to solve 2nd order ode in hyper functions (#17603 by @RituRajSingh878)
- checkodesol now works for series solutions of ODEs. (#17588 by @oscarbenjamin)
-
nonlinsolve
will not return unevaluatedConditionSet
withFiniteSet
in itscondition
parameter, instead, it will use a relationalAnd(Eq(...) ...)
for the parameter for depicting the system of unsolved equations. (#17651 by @oscarbenjamin and @sylee957) -
Add solvers for Bessel and Airy differential equations in dsolve (#16581 by @RituRajSingh878)
-
removed bug from factorable (#17586 by @RituRajSingh878)
-
modify dsolve for the equation having factors (#17338 by @oscarbenjamin and @RituRajSingh878)
-
removed lie_group bug (#17527 by @RituRajSingh878)
-
added a method to dsolve for removing the redundant solution (#17419 by @RituRajSingh878)
-
Fixes nonlinsolve bug which raised an AttributeError (#17494 by @sachin-4099)
-
equals
is used less often making solution process faster in some cases (#17477 by @smichr) -
added
_solve_modular
to handle equations of type a - mod(b, c) = 0 where b is expr (#16976 by @jmig5776) -
the gcd of parameterized ternary solutions is now removed (#17348 by @smichr)
- In checkodesol, added recurrence relation of Bessel function to reduce expression contains Bessel function. (#16707 by @RituRajSingh878)
-
solve
will separateAbs(x/y)
asAbs(x)/Abs(y)
when solving forx
ifx
is real so NotImplemented is no longer raised. (#17307 by @oscargus and @smichr) -
diop_solve
docstring updated to state thatdiophantine()
method is recommended over helper functions. (#17193 by @Abhi58 and @smichr) -
improved
bivariate
to return all lambert solutions (#16890 by @jmig5776)
-
-
stats
-
Allow symbolic parameters in
sympy/stats/joint_rv_types
(#17268 by @ritesh99rakesh) -
Added sample methods for finite RVs under
frv_types.py
(#17445 by @ritesh99rakesh)
-
Circular ensembles have been added in
sympy.stats
. (#17304 by @czgdp1807) -
Matrices with random expressions have been added in
sympy.stats
. (#17306 by @czgdp1807) -
Random matrices have been added to
sympy.stats
(#17174 by @czgdp1807)
-
Added factorial moment function under
sympy/stats/rv_interface.py
(#17077 by @ritesh99rakesh) -
Added
ExponentialPower
distribution tosympy/stats/crv_types.py
(#17070 by @ritesh99rakesh) -
Added skellam distribution to
sympy/stats/drv_types.py
(#17099 by @ritesh99rakesh)
-
ContinuousMarkovChain
have been added tosympy.stats
(#17163 by @czgdp1807)
- Added Exponentially modified Gaussian
ExGaussian
distribution tosympy/stats/crv_types.py
(#17076 by @ritesh99rakesh)
-
DiscreteMarkovChain
is now able to handle complex queries. (#17083 by @czgdp1807) -
symbolic dimensions allowed for finite distributions (#16962 by @czgdp1807)
-
random_symbols
are now canonically sorted by name (#16934 by @czgdp1807)
- Attributes specific to
DiscreteMarkovChain
have been added like,is_absorbing_chain
,fixed_row_vector
, etc. (#17046 by @czgdp1807)
- added check condition for
LogNormal
distribution. (#17068 by @ritesh99rakesh)
-
joint_distribution
added toStochasticProcess
. (#17030 by @czgdp1807) -
Gumbel distribution(minimum and maximum) have been added to
sympy.stats
(#16528 by @czgdp1807 and @sylee957) -
StochasticProcess
andDiscreteMarkovChain
added tosympy.stats
. (#16981 by @czgdp1807)
-
Added
BetaBinomial
distribution tosympy.stats.frv_types
. (#16815 by @ritesh99rakesh) -
added
kurtosis
method (#16935 by @ritesh99rakesh) -
Added Log-logistic distribution in
sympy/stats/crv_types.py
(#16848 by @ritesh99rakesh) -
Addition of Inverse Normal distribution to
sympy/stats/crv_types.py
(#16814 by @ritesh99rakesh)
- joint_rv_types can now be imported with
from sympy.stats import *
(#16919 by @czgdp1807)
-
Added missing checks and property
set
for crv_types (#16858 by @ritesh99rakesh) -
Corrected
_moment_generating_function
forGumbel
distribution (#16858 by @ritesh99rakesh)
-
Generalized Multivariate Log Gamma Distribution has been added to
sympy.stats.joint_rv_types
(#16825 by @czgdp1807) -
Refactored sympy.stats.frv_types and sympy.stats.frv (#16765 by @czgdp1807)
-
multivariate distributions added to sympy.stats.joint_rv_types (#16576 by @czgdp1807)
- Addition of Noncentral Beta distribution to
sympy/stats/crv_types.py
(#16827 by @ritesh99rakesh)
-
Random variable can be used as given_condition (#15836 by @czgdp1807)
-
Addition of Multinomial Distribution to
sympy.stats.joint_rv_types
(#16808 by @czgdp1807) -
Added
quantile
function (#16542 by @supreet11agrawal) -
Addition of entropy to stats module (#15693 by @czgdp1807)
-
removed bug in
marginal_distribution
for joint distributions of three or more variables (#16574 by @czgdp1807) -
Improved paramter handling by F Distribution (#16312 by @supreet11agrawal)
-
-
tensor
-
fix negative indices access to N-dimensional arrays. (#17669 by @Upabjojr and @yeshsurya)
-
Allow construction of
IndexedBase
with subclasses ofSymbol
without upcasting toSymbol
(#17653 by @theHamsta)
-
Extended
.substitute_indices()
method for all tensor expressions. (#17516 by @drybalka) -
Deprecated
.fun_eval()
in favor of.substitute_indices()
. (#17516 by @drybalka) -
Deprecated
.__call__()
for all tensor expressions. (#17516 by @drybalka)
-
Enabled lamda expression in ArrayComprehension (#17408 by @kangzhiq)
-
Modified iter function and added new class named nditer (#17308 by @kangzhiq)
-
Added .fully_symmetric(), .no_symmetry(), .direct_product(), .riemann() methods for TensorSymmetry generation. (#17124 by @drybalka)
-
Deprecated tensorhead() and tensorsymmetry() static methods. (#17124 by @drybalka)
-
Bugfix of
__getitem__
for single item array (#17282 by @kangzhiq) -
Modified the behavior of
__getitem__
on Array to better match NumPy (#17226 by @kangzhiq) -
Added specific cases for sparse array in
permutedims
and tests (#17035 by @kangzhiq) -
Added specific case for sparse array in div, neg and tests (#17026 by @kangzhiq)
-
Added specific cases for sparse array in tensorproduct and tests (#17000 by @kangzhiq)
-
added support for inheriting assumptions from symbols to IndexedBase (#17009 by @bsamseth and @smichr)
-
Added specific case for sparse array in mul, rmul and tests (#17014 by @kangzhiq)
-
Added specific case for sparse array in derive_by_array (#16937 by @kangzhiq)
-
added support for assumptions on IndexedBase (#16085 by @bsamseth)
-
Added functions to ArrayComprehension. (#16969 by @kangzhiq)
-
Added a new array object ArrayComprehension for list comprehension. (#16845 by @kangzhiq)
-
Make the 'indices' parameter in .replace_with_arrays optional. (#16493 by @kangzhiq)
-
-
utilities
- Fixed a bug that would crash lambdify if expression contained E with no power. (#17315 by @johanbluecreek)
- Using stirling method in multiset_partitions method docstring instead of old S2 manually defined method (#17191 by @Abhi58)
- remove
sympy_dir
variable fromsympy.utilities.runtests
. Useget_sympy_dir()
instead (note that this is not really public API). (#17180 by @asmeurer)
-
lambdify
will properly catch up the submodules used in external module import. (#16933 by @sylee957)
- fixes a bug in generated code with unused array arguments (#16792 by @spcornelius)
-
other
-
Fix various references throughout the docs so that they link properly. (#17698 by @asmeurer)
-
Added several missing docstrings to the Sphinx documentation. (#17698 by @asmeurer)
- The headers in docstrings for "Examples", "See Also", "References" and so on are now rendered larger in the HTML documentation. (#17675 by @asmeurer)
-
PyPy 3 is now tested and supported. (#17607 by @asmeurer and @oscarbenjamin)
-
Made
[Source]
from the documentation redirect to the SymPy GitHub repository instead of having a copy of the source code in the documentation files. (#17504 by @sylee957) -
Edited all the header names of the doc file to match the name of submodule. (#17499 by @harsh9200)
-
Sorted the Index in alphabetical order. (#17499 by @harsh9200)
-
it should now be possible to run tests from any directory (#17410 by @smichr and @Soniyanayak51)
-
Fixed a bug in coverage_doctest (#16729 by @Bharat123rox)
-
Python 3.4 support has been removed. See https://github.com/sympy/sympy/wiki/Python-version-support-policy. (#16492 by @asmeurer)
-
The following people contributed at least one patch to this release (names are given in alphabetical order by last name). A total of 132 people contributed to this release. People with a * by their names contributed a patch for the first time for this release; 68 people contributed for the first time for this release.
Thanks to everyone who contributed to this release!
- Akash Nagaraj (akasnaga)*
- Shubham Abhang
- Abhi58*
- Louis Abraham*
- Sachin Agarwal
- Harsh Agarwal*
- Supreet Agrawal
- Abhinav Anand*
- Oscar Gerardo Lazo Arjona*
- arooshiverma*
- Juan Barbosa*
- Oscar Benjamin
- Gabriel Bernardino*
- Parker Berry
- Johan Blåbäck
- Francesco Bonazzi
- Ondřej Čertík
- Arighna Chakrabarty
- Pengning Chao*
- Sean P. Cornelius*
- Björn Dahlgren
- Nabanita Dash
- Anway De*
- Gaurav Dhingra
- Mark Dickinson*
- dranknight09*
- Zachariah Etienne
- Isuru Fernando
- Enric Florit*
- Mauro Garavello
- Matthias Geier
- Sourav Ghosh
- Lauren Glattly*
- Christoph Gohle*
- Erik R. Gomez*
- Oscar Gustafsson
- David Hagen*
- hannah-kari*
- Hou-Rui*
- Hugo
- Denis Ivanenko*
- jgulian*
- Shubham Kumar Jha
- Ishan Joshi
- Aadit Kamat*
- kangzhiq
- Hannah Kari*
- Atharva Khare
- Cameron King*
- Shivani Kohli
- George Korepanov*
- Amit Kumar
- Ritesh Kumar
- Petr Kungurtsev*
- Samesh Lakhotia*
- Ronan Lamy
- S.Y. Lee
- Steven Lee*
- Jun Lin*
- luzpaz
- Megan Ly*
- Morten Olsen Lysgaard*
- Nikhil Maan*
- Colin B. Macdonald
- Riccardo Magliocchetti*
- Kirtan Mali*
- Miguel Marco*
- Maxence Mayrand
- Pragyan Mehrotra
- Henry Metlov*
- Aaron Meurer
- Jogi Miglani
- Aaron Miller
- Sudhanshu Mishra
- Yogesh Mishra*
- Jason Moore
- Yeshwanth N*
- Akshay Nagar
- Akash Nagaraj*
- Sidhant Nagpal
- Prionti Nasir*
- Soniya Nayak*
- Abdullah Javed Nesar
- Kenneth Emeka Odoh*
- OrestisVaggelis*
- Ankit Raj Pandey
- pekochun*
- Ruslan Pisarev
- Tomasz Pytel*
- Bharat Raghunathan*
- Samnan Rahee
- Shekhar Prasad Rajak
- Rohit Rango
- Joseph Redfern*
- Juha Remes
- Rimi*
- rimibis*
- Faisal Riyaz
- Martin Roelfs
- Denys Rybalka*
- Denis Rykov*
- Samesh*
- Bendik Samseth*
- Gilles Schintgen*
- Stan Schymanski
- Daniel Sears*
- Stephan Seitz*
- Vighnesh Shenoy*
- Qingsha Shi*
- Rajiv Ranjan Singh
- Gagandeep Singh
- Jashanpreet Singh
- Ritu Raj Singh
- Arun Singh
- Sartaj Singh
- Animesh Sinha
- Gleb Siroki
- Chris Smith
- Ralf Stephan
- Kalevi Suominen
- Divyanshu Thakur
- TitanSnow*
- Ivan Tkachenko*
- Charalampos Tsiagkalis*
- Versus Void*
- Ethan Ward
- Jonathan Warner
- Arun Yeragudipati*
- Srinivasa Arun Yeragudipati*
- Velibor Zeli*
- Zhi-Qiang Zhou
- znxftw*