Release Notes for 1.10 - sympy/sympy GitHub Wiki
These are the release notes for SymPy 1.10. You can also find release notes for previous versions.
SymPy 1.10 was released on 6th March 2022.
This version of SymPy has been tested on Python 3.7, 3.8, 3.9, 3.10 and PyPy 3.8. See our Python version support policy for more information on when we plan to drop support for older Python versions.
Note in particular that SymPy 1.5.1 was the last release to support Python 2.7. SymPy 1.10 will not work on Python 2.7. Python 2.7 users should install SymPy 1.5.1 and will not be able to install any further SymPy updates without updating to Python 3.
Install SymPy with
pip install -U sympy
or if you use Anaconda
conda install sympy
There are many changes in 1.10 (see below).
-
The SymPy documentation is now organized into helpful categories, based on the Diátaxis Framework . This work is due to the Joannah Nanjekye's 2021 Season of Docs project.
-
The Laplace transform computations has become much more powerful using a rule-based system. (#22376 by @hanspi42)
-
All active deprecations in SymPy have been revamped. The deprecation warning messages are now more informative, and the active deprecations page in the documentation lists all active deprecations and gives more details about them. Additionally, our deprecation policy has been moved to the documentation, and updated to formally state that all deprecations will last for at least 1 year.
-
A number of classes and functions have been moved to better locations mostly to resolve problems with cyclic imports within the SymPy codebase. Most of these are deprecated and will emit a warning, although for some rare cases, there may have been moves without a deprecation. Code that imports these classes and functions from the precise module where they are defined either needs to be updated or should be changed to use a generic import. For example the
ordered
function is intended to be imported asfrom sympy import ordered
. However it was also possible to import it asfrom sympy.utilities.iterables import ordered
. Since it has now moved a fully qualified import would befrom sympy.code.sorting import ordered
although importing in this way is still discouraged. Importing fromsympy.utilities.iterables
now returns a stub function that will emit a deprecation warning when called. In a future release the stub function will likely be removed so thatfrom sympy.utilities.iterables import ordered
will give anImportError
. The intended importfrom sympy import ordered
continues to work with all SymPy versions and will not give any warning or error. -
BREAKING: removed the since long deprecated
densearith
,densesolve
, anddensetools
(#22949 by @oscargus) -
BREAKING CHANGE:
core.trace
with classTr
moved tophysics.quantum.trace
. (#22297 by @oscargus and @smichr).
-
combinatorics
-
Subset
is now no longer a subclass ofBasic
. (#22421 by @ThePauliPrinciple) -
bug fix: comparisons between
Subset
s no longer always returnTrue
. (#22421 by @ThePauliPrinciple) -
Added fifth Schur number (160) and better lower bounds. (#22225 by @oscargus)
-
Corrected documentation for Disjoint Cycle notation. (#20719 by @lastcodestanding)
-
-
concrete
-
A
Sum
can now be rewritten as aProduct
. (#22331 by @oscargus) -
free symbols appearing only in expressions of variables of integration, summation, ... no longer reported as free symbols (#22541 by @smichr)
-
fixed an issue with the use of Range (with an argument of -oo) as s Sum/Product variable range (#22363 by @smichr)
-
Performing
evalf
on someSum
no longer leads to comparison errors. (#22284 by @oscargus)
-
-
core
-
Previously,
Basic
considered arguments that evaluate equal, but do not have the same type (e.g.1.0 == 1
), to be equal for the purposes of determining structural equality ofBasic
s. This is no longer the case andBasic
s equality comparison now works the same as that ofExpr
. (#22651 by @ThePauliPrinciple) -
uniquely_named_symbol
usescompare
(defaultstr
) to get the string name of the passedxname
(#22669 by @smichr) -
to query whether a object appears as a non-bound object, use
expr.has_free(obj)
(#22539 by @smichr)
- A bug that sometimes lead to an InconstentAssumptions exception being raised in code that uses the same SymPy object in multiple threads was fixed. (#22548 by @ayushbisht2001)
- nan is returned for any power (with exponent not 0 or 1) with infinite real and imaginary portions, e.g. 1/(oo + I*oo)->nan (#22516 by @smichr)
- Handling of power substitutions like
(1/x).subs(x**2, y)
was made more robust. This indirectly fixed problems leading to incorrect evaluation of integrals. (#22052 by @oscarbenjamin and @smichr)
-
nfloat
will no longer change args of user-defined functions to Float; solutions from solve may differ (#22528 by @smichr) -
canonical will recurse into Relational args in Eq and Ne so
Eq(y<x,x>y).canonical -> True
(#22483 by @smichr and @sympy) -
a Float(0) is retained during negation and simplification (#22441 by @smichr)
-
there is better detection of small (|x| < 1) and large numbers raised to oo or -oo (#22441 by @smichr)
-
subs will handle +/-oo and zoo before other replacements to help guard against evaluating indeterminate forms (#22441 by @smichr)
-
Evaluation of expressions involving zoo is now handled properly in evalf without raising obscure exceptions. (#22211 by @eagleoflqj)
-
BREAKING CHANGE:
core.trace
with classTr
moved tophysics.quantum.trace
. (#22297 by @oscargus and @smichr) -
Expr.could_extract_minus_sign
is strictly literal about removing a leading sign on Mul or canonically preferring-a
overa
based on the explicit sign of each term (not on the net sign of each factor of the term) (#22232 by @oscargus and @smichr) -
exp
is handled the same asPow
wrtextract_multiplicatively
(#22270 by @smichr) -
fixed bug in mul.py related to sign of
zoo
. (#22281 by @praneethratna and @smichr) -
added a functionality for count_ops to distinguish user-defined functions from other types of objects. (#22229 by @praneethratna)
-
Expr.coeff improved in handling of non-commutative sums (#22140 by @smichr and @t-ens)
-
match
no longer throws are exception for certain relationals. (#22047 by @oscargus and @smichr) -
multiplying an Add by a Rational will now yield a fully evaluated expression (#22036 by @smichr)
-
-
functions
-
Fixed a bug with the indefinite integral of trigonometric functions with respect to a different variable in `manualintegrate.py' (#22765 by @ddtcode)
-
bug fixed for simplification of Piecewise expressions (#22751 by @smichr)
-
condition of Piecewise which are univariate are made more canonical (redundant conditions removed) (#22751 by @smichr)
-
fixed a bug with integrating certain piecewise functions (#22540 by @NikhilSDate)
-
Added a function
Rem
to find remainder with same sign as the dividend (Mod
has same sign as divisor). (#22347 by @gurpartap0306 and @smichr) -
combinatorial numbers enumeration function for deranngements, nD, added that is similar to nP, nC and nT. (#21903 by @rathmann and @smichr)
-
arg will no longer nest past 3 levels for generic arg; 2 level for real arg (#22402 by @smichr)
-
Piecewise.eval is faster: removed steps that should be in simplification (#22286 by @smichr)
-
Some functions were numerically evaluated at incorrect precision. (#22325 by @oscargus)
-
Piecewise will always process True/False conditions, even if
evaluate=False
(#22319 by @smichr) -
Piecewise will use global
evaluate
setting if present (#22319 by @smichr) -
Better zero detection for
LambertW
and some hyperbolic and trigonometric functions. (#21979 by @oscargus and @smichr) -
Better assumption support for error functions. (#22261 by @oscargus)
-
piecewise_fold
has the option to avoid evaluation (#22196 by @smichr)
- Conjugate class now has an inverse method so it should work better in the solvers. (#20720 by @kc611)
- Improve sign(..., evaluate=False).doit(). (#22098 by @eagleoflqj)
-
-
geometry
-
projection
method ofline.py
now returns EmptySet when there is no projection of one entity onto another. (#22817 by @praneethratna) -
Fixed issue when
with evaluate(False)
forPoint2D
. (#22714 by @oscargus) -
Line
class can now define horizontal and vertical lines usingEq
(#22369 by @praneethratna)
-
-
integrals
-
The Laplace transform is now rule-based, can transform a far wider range of expressions, and works better with undefined functions, including the ability to transform differential equations. (#22376 by @hanspi42)
-
Minor fix in case of constant gcd in Risch. (#22283 by @oscargus and @smichr)
-
a bug in indefinite meijerg integration was fixed (#22196 by @smichr)
-
-
logic
-
Function
gateinputcount
added to returns the total number of inputs for all classes corresponding to gates in the expression. (#21973 by @oscarbenjamin and @oscargus) -
Improved simplification of Boolean expressions with relations. (#22585 by @oscargus)
-
Many more functions added to documentation. (#22222 by @oscargus and @smichr)
-
integer_to_term
will now raise an error for negative args or when the requested size is too small; use ofibin
is recommended (#22301 by @smichr)
-
-
matrices
-
BREAKING: removed the since long deprecated
densearith
,densesolve
, anddensetools
(#22949 by @oscargus) -
Fixed bug when collapsing inverse block matrices (#22544 by @Franck2111)
- Matrix calculus is now supported through the matrix expression derivative algorithm. Derivatives of matrix expressions are now computed in the array expressions module. The result is therefore able to represent higher dimensional arrays. If trivial dimensions are present, an attempt is made at converting the resulting array expression back to matrix expression (that is, a matrix virtually equivalent to the 4-dimensional array, if it can be found). (#22476 by @Upabjojr)
-
SparseMatrix
can now be imported fromsympy.matrices.sparse
likeMatrix
can be imported fromdense
; both can still be imported fromsympy.matrices
(#22370 by @smichr) -
Access the Hermite normal form function from polys (#22233 by @skieffer)
-
It is now possible to use
.det()
on matrix symbols and matrix expressions. (#22114 by @oscargus and @smichr)
-
-
ntheory
-
perfect_power
now only raises a ValueError for non-Rational input (#22672 by @smichr) -
Improved the performance of the
is_square(n)
function. (#22431 by @sweeneyde)
-
-
parsing
-
corrected parsing error that happened when when local_dict value was None (#22829 by @smichr)
-
parse_expr converts builtin abs, max, min, pow to sympy functions (#22169 by @eagleoflqj)
-
strings 'all' and 'implicit' can be passed to select commonly used transformations;
T
can be sliced to give desired transformations forparse_expr
(#22255 by @smichr) -
Support evaluate=False for common functions in parse_expr. (#22098 by @eagleoflqj)
-
-
physics.control
-
physics.optics
- changed Medium to inherit from Basic instead of Symbol (#22696 by @NikhilSDate)
- lens_makers_formula() in sympy/physics/optics/utils.py can now calculate focal length of thick and plano lenses. (#20169 by @sidhu1012)
-
physics.quantum
-
physics.units
-
Added L, dL, cL and mL as synonyms to l, dl, cl and ml. (#22741 by @rikardn)
-
Fixed deprecation warning when pow exponent is malformed (#22167 by @blackyblack)
-
-
physics.vector
-
polys
-
Speed up
field_isomorphism()
. (#22737 by @jksuom and @skieffer) -
Add support for conversions
ANP
-->AlgebraicNumber
. (#22646 by @skieffer) -
Fixed related issues in
minimal_polynomial()
andfield_isomorphism()
. (#22562 by @skieffer) -
Fixed a bug in minpoly (#22610 by @Leowbattle)
-
Add calculation of integral bases for number fields in
polys.numberfields.basis
. (#22316 by @skieffer) -
Add prime factorization in number fields in
polys.numberfields.primes
. (#22316 by @skieffer) -
Add other supporting functionality and classes. (#22316 by @skieffer)
-
New functionality can be accessed through new methods in the existing
polys.domains.algebraicfield.AlgebraicField
class. (#22316 by @skieffer) -
The
poly
function andas_poly
methods now returnNone
instead of raisingGeneratorsNeeded
for constant expressions when no generators are given. (#20773 by @kc611 and @oscarbenjamin) -
Additions to DomainMatrix: columnspace, rowspace, is_upper, is_lower, is_square, rank (#22233 by @skieffer)
-
IntegerPowerable class: supports powering for classes that define
__mul__
(#22233 by @skieffer) -
Remove some expensive and redundant convert operations when calculating syzygies (#22273 by @isuruf)
-
Faster root computation for two-term polynomials with large integer constant. (#22243 by @oscargus)
-
The
sympy.polys.numberfields
module was refactored into a package with a number of submodules. (#22234 by @skieffer)
-
-
printing
-
Less verbose LaTeX printing for
Idx
class (#22906 by @ThePauliPrinciple) -
LaTeX and pretty printing of
FourierSeries
with zero sequence do not hang. (#22772 by @oscargus) -
MatrixSymbol
with ^ in name can be LaTeX-printed without errors. (#22772 by @oscargus) -
No superfluous parenthesis for
Adjoint
andTranspose
in LaTeX and pretty. (#22772 by @oscargus) -
LaTeX printing for
PowerSet
and ordinals. (#22705 by @oscargus) -
S.Catalan
is now printed asG
in LaTeX and pretty printers. (#22663 by @oscargus) -
Improved LaTeX-printing of
DFT
andIDFT
. (#22663 by @oscargus) -
Fixed
str
-printing of unevaluated multiplication of reciprocals. (#22706 by @oscargus) -
Dedicated LaTeX and pretty printing for
Covariance
,Expectation
,Probability
andVariance
. (#22661 by @oscargus) -
Support latex printing for
AlgebraicNumber
(#22627 by @skieffer) -
Meijer-G function and Bessel functions in MpmathPrinter (#22506 by @scimax)
-
More automatic code rewrites to use available functions. (#22332 by @oscargus)
-
Automatic code rewrite support for the Rust printer. (#22332 by @oscargus)
-
Better support for Boolean functions (
Xor
,Implies
, etc) in code generation through rewriting. (#22311 by @oscargus)
- Fixed issue with printing latex of unevaluated
Mul
with fractions (#21101 by @iam-abbas)
-
Fixed LaTeX printing of
ZeroMatrix
andOneMatrix
(#22116 by @oscargus) -
Better LaTeX printing of symbolic
Range
. (#22088 by @oscargus) -
Corrected C-printing of
Mod
(for negative divisors) (#22089 by @oscargus) -
Improved and corrected LaTeX-printing of
Mod
. (#22091 by @oscargus) -
Remove curly braces from subscripted variables in python() and pycode() (#20806 by @AaronStiff and @oscargus)
-
Fixed a bug where
TheanoPrinter
fails to print Euler's number e (sympy.core.numbers.Exp1
) (#20335 by @craymichael) -
preview
's use ofpyglet
now works on Fedora Linux (#20600 by @jamesjer)
-
-
series
-
Limit now converts
Float
's in the expression toRational
s or exact SymPy numbers when possible (#22213 by @0sidharth) -
Fixed a bug due to insufficient power simplification in limits (#22182 by @0sidharth)
-
fixed bug in Order.contains (#22170 by @praneethratna)
-
-
sets
-
simplify
-
CSE now treats matrix symbols and subelements as atomic in cse (#22840 by @peabody124, @smichr, and @zouhairm)
-
the presence of UndefinedFunction no longer affects how expressions with gamma functions are simplified (#22618 by @smichr)
-
powsimp
now recognizes any negated exponent that is an integer or that occurs on positive bases (#22578 by @smichr)
-
-
solvers
- Bernoulli differential equations are more often classified as such in
classify_ode
because of a fix to matching (#22799 by @smichr)
-
disabling lower-order solvers automatically disables higher order solvers: cubics=False automatically sets quartic and quintic to False, too (#22642 by @smichr)
-
Fixed a bug causing
solve
to raiseGeneratorsNeeded
when an equation such assqrt(2)
is included in a system. (#20773 by @kc611 and @oscarbenjamin) -
Bug in
nonlinsolve
withexp
leading to exception sorted out. (#22423 by @oscargus) -
use of
match
was removed to make solving more reliable (#22097 by @Maelstrom6 and @smichr) -
solveset
correctly solvesarg
when the argument is complex. (#21925 by @oscargus)
- Bernoulli differential equations are more often classified as such in
-
tensor
-
utilities
-
multiset_derangements
has an optimized finishing routine (#22904 by @smichr) -
corrected a special-case derangement of a multiset where a single repeated element multiplicity is 1 less than the non-repeated elements (like 'mmabc' or 'mmmabcd') (#22904 by @smichr)
-
generate_derangements
formerly always emitted derangements from filtered permutations; now, when a multiset is involved, the much fastermultiset_derangements
is called and the ordering of derangments will be different than before. (#22904 by @smichr) -
Basic lambdify support for 1-D and 2-D
NDimArray
(#22740 by @oscargus) -
Fixed issue with lambdify of a
Piecewise
withITE
conditions. (#22740 by @oscargus) -
language_level
is automatically set to 3 when compiling with cython usingutilities._compilation
, but can be overridden by providing another language_level. (#22742 by @oscargus and @sympy) -
iterables function for generating derangements of a sequence was added (#21903 by @rathmann and @smichr)
-
postorder_traversal
is moved fromutilities.iterables
tocore.traversal
. (#22323 by @oscargus) -
interactive_traversal
is moved fromutilities.iterables
tointeractive.traversal
. (#22323 by @oscargus) -
Fixed issue with incorrect lamdifying behaviour of
Mod
whenmodules = []
. (#22080 by @bjodah)
-
-
vector
- Always return
Derivative
instance from_diff_conditional
inoperators.py
since thecoeffs
may be functions of the base scalars even ifexpr
is not (#20047 by @lindsayad and @smichr)
- Always return
-
other
-
Visitors to the documentation site, docs.sympy.org, using screen readers should have the text announced in the correct language. (#22812 by @bertiewooster)
-
bare Relational (x == 1) and binary operations (x + 1) will raise a code-quality error if they are in the test suite and not in a
with-block
(#22485 by @smichr) -
manual file-hander pitfall was removed (#22410 by @NaelsonDouglas and @python-pitfalls)
-
Type hints were added to silence all mypy errors in the sympy codebase. (#22212 by @oscarbenjamin)
-
The following people contributed at least one patch to this release (names are given in alphabetical order by last name). A total of 68 people contributed to this release. People with a * by their names contributed a patch for the first time for this release; 33 people contributed for the first time for this release.
Thanks to everyone who contributed to this release!
- Wang Ran (汪然)*
- Advait*
- AkuBrain*
- alijosephine*
- anutosh491*
- Leo Battle*
- Oscar Benjamin
- Anurag Bhat*
- Ayush Bisht
- Remco de Boer
- Francesco Bonazzi
- Zach Carmichael
- Kaustubh Chaudhari
- James Cotton
- Björn Dahlgren
- Nikhil Date*
- Risiraj Dey*
- Travis Ens*
- Isuru Fernando
- Tom Fryers*
- Matthias Geier
- Naman Gera
- Pieter Gijsbers*
- Oscar Gustafsson
- Sayandip Halder
- S. Hanko*
- Jerry James
- Kuldeep Borkar Jr*
- Evgenia Karunus*
- Steve Kieffer*
- Andreas Klöckner
- Matthias Köppe
- Ayush Kumar
- lastcodestanding*
- S.Y. Lee
- Andrey Lekar*
- Alex Lindsay
- Qijia Liu
- Hampus Malmberg*
- Anibal M. Medina-Mardones*
- Aaron Meurer
- mohajain*
- Abbas Mohammed*
- Jeremy Monat*
- Jason Moore
- Sidharth Mundhra
- naelsondouglas*
- Joannah Nanjekye
- Rikard Nordgren
- Chris du Plessis
- Mamidi Ratna Praneeth
- rathmann
- Hanspeter Schmid
- scimax*
- shubhayu09*
- Sudeep Sidhu
- Gagandeep Singh
- Gurpartap Singh*
- Chris Smith
- Paul Spiering*
- Aaron Stiff
- Kalevi Suominen
- Dennis Sweeney*
- Diane Tchuindjo*
- Aman Thakur*
- Eric Wieser
- Zouhair*
- zzj*
6cf85a5cfe8fff69553e745b05128de6fc8de8f291965c63871c79701dc6efc9 sympy-1.10.tar.gz 2009368e862cd29f1b568dc6572786371a2faa1cd8eb4d313e11a90195d6ee36 sympy-1.10-py3-none-any.whl 362fb7ff7437a8ac156147395c89487c156ba57ba406655a6fddace30c4b0fc6 sympy-docs-html-1.10.zip de6a8445dbf0bf8f094495b18ccc49e1800d598adc40e194962ebe8792401164 sympy-docs-pdf-1.10.pdf