Release Notes for 1.4 - sympy/sympy GitHub Wiki

These are the release notes for SymPy 1.4. You can also find release notes for previous versions.

SymPy 1.4 was released on April 9, 2019.

This version of SymPy has been tested on Python 2.7, 3.4, 3.5, 3.6, 3.7 and PyPy. See our Python version support policy for more information on when we plan to drop support for older Python versions. SymPy 1.4 will be the last version of SymPy to support Python 3.4, which has reached its end of life.

Install SymPy with

pip install -U sympy

or if you use Anaconda

conda install sympy

Highlights

There are many changes in 1.4 (see below). Some of the highlights are

  • Logic expressions with relations can now be simplifed in a better way which has impact on e.g. simplification of piecewise expressions

  • The MathML Presentation printer has seen a major improvement with support configuration and about a hundred new functions.

  • Union and Intersection have been improved to, among other improvements, support Python sets.

  • The test procedure has been changed to include code coverage and code quality checks leading to a number of issues being identified and removed.

  • Unicode support, especially for Python 2.7, has been improved.

  • subs and Subs have been improved in a number of ways.

  • SymPy objects now renders as LaTeX automatically in Jupyter notebooks. init_printing is still required to LaTeX render non-SymPy objects such as lists of expressions or Python ints.

Please feel free to manually add any major changes for this release here, in addition to the automatic change listed below.

Backwards compatibility breaks and deprecations

Please manually add any backwards compatibility breaks or deprecations here, in addition to the automatic listing below.

  • Deprecate keyword arguments 'rows' and 'cols' for jordan_block #16208.

  • Deprecate support for same primes in rsa_public_key and rsa_private_key #16172.

  • Deprecate _cache_is_diagonalizable and _cache_eigenvects #16163.

  • sympy.physics.quantum.matrixutils uses deprecated np.matrix #15563.

  • Deprecate .data property in favor of the new .replace_with_arrays method in the tensor module #15278.

  • The deprecated unitsystems module has been removed.

  • The deprecated TIDS class have been removed.

Changes

  • algebras

  • assumptions

    • AskPrimeHandler will return None if the input is equal to an Integer but contains Float values that make it imprecise (#16081 by @smichr)

    • improved matrix assumptions so ask can make deductions about instances of MatPow (#15142 by @valglad)

  • calculus

  • categories

  • codegen

    • Fixed scaling of Octave/Matlab's incomplete gamma function. (#16534 by @cbm755)

    • Improvements in parsing of indexed expressions into codegen array utilities. (#15611 by @Upabjojr)

    • Allow permutation of dimensions to be sunk into the expression tree. (#15490 by @Upabjojr)

    • Parser in array utils now supports multiple Kronecker deltas. (#15489 by @Upabjojr)

    • Fixing bug in permutation of dimensions. (#15480 by @Upabjojr)

    • Added classes to support generation of array operations in printers. (#15427 by @Upabjojr)

    • Fix wrong result in create_expand_pow_optimization() (#15338 by @zachetienne)

  • combinatorics

    • Fixed the input of FpGroup for trivial case (#16083 by @fchapoton)

    • Elementary and polycyclic groups has been added to perm_groups.py (#16248 by @divyanshu132)

    • PermutationGroup.is_normal did not perform a check if the group that is tested to be a normal subgroup is even a subgroup. (#15800 by @FabianBall)

    • When the identity group (a PermutationGroup that is generated by the identity permutation) was tested to be a normal subgroup of any other group, PermutationGroup.is_normal gave the incorrect result (False instead of True). (#15800 by @FabianBall)

  • concrete

    • Fixed a bug in eval_sum_hyper (#15855 by @jmig5776)

    • Avoid infinities in _eval_sum_hyper by simplifying before substitution. (#15990 by @divyanshu132)

    • bound_symbols returns the bound symbols of the expr (#15300 by @smichr)

    • Sum returned by gosper_sum is checked for singularities caused due to denominator and correct sum at that point is returned as a Piecewise. (#14132 by @jashan498)

    • Sum.dummy_eq added to allow comparisons of Sums that have a dummy symbol in them (#15239 by @smichr)

  • core

    • count_ops no longer handles objects with strings in their .args (all elements of .args for SymPy objects should be Basic subclasses). (#15121 by @asmeurer and @smichr)

    • Matrices are now handled in Add/Mul using postprocessors. (#15948 by @asmeurer and @smichr)

    • The experimental _constructor_postprocessor_mapping API no longer applies postprocessors from subexpressions. Note that this API is experimental and may change or be removed in a future version of SymPy without deprecation. (#15948 by @asmeurer and @smichr)

    • Replace with more than one symbol is exact unless exact is explicitly made False (#16322 by @smichr)

    • arity function added to core.functions (#16304 by @smichr)

    • Improve compatibility for unicode strings (#16096 by @divyanshu132 and @smichr)

    • Improve of unicode strings by subs in python 2 (#16205 by @gaetano-guerriero)

    • Derivative with count == wrt now responds to subs (#16171 by @RituRajSingh878)

    • Removed special cache for integers and used standard cache. (#15803 by @debugger22 and @NoumbissiValere)

    • Improved Unicode text handling by subs (#16093 by @supreet11agrawal)

    • Compatibility - as_int now rejects (by default) non-literal integer input. This means many number theory functions now raise TypeError on integral float inputs like 7.0. (#16081 by @smichr)

    • The Relational property canonical now gives the same result in more cases which is helpful in some other methods. (#16004 by @oscargus)

    • Replace np.asscalar in sympify (#16064 by @divyanshu132)

    • Relationals now have a property negated, which returns the opposite to the relation, similar to ~. (#15924 by @oscargus)

    • Fix is_zero becoming False on some expressions with Add. (#15875 by @smichr and @sylee957)

    • UndefinedFunction class modified to give correct results to f.name for functions of type Function('f') (#15460 by @czgdp1807)

    • replace no longer accepts string inputs. This fixes some performance issues that occurred when calling replace with non-SymPy inputs such as Python functions. (#15769 by @asmeurer)

    • Fixed a bug in mod (#15599 by @rationa-kunal and @smichr)

    • sqrt(I) is left unchanged instead of being rewritten to (-1)**(1/4) (#15668 by @AnimeshSinha1309)

    • Substitution of powers of symbols is applied to those symbols as well (#15565 by @normalhuman)

    • divmod now works on SymPy expressions (#15562 by @asmeurer)

    • Number.__divmod__ now works like the builtin divmod for negative numbers (#15567 by @FrackeR011)

    • Fixed a bug in the creation of higher order derivatives that cannot be evaluated. (#15519 by @normalhuman)

    • Fixed a bug in the substitution of powers of a real variable. (#15535 by @normalhuman)

    • Fixed a bug in evaluation of sums with floating-point zeros. (#15514 by @normalhuman)

    • Replaced _gcdcache with lru_cache in numbers.py (#15453 by @FrackeR011)

    • Increased size of lru_cache from 100 to 1024 (#15453 by @FrackeR011)

    • Derivative has faster quick exit for 0 (#15049 by @smichr)

    • Subs involving changing UndefinedFunction to Function in Derivative wrt variables will now create a Subs instance (#15049 by @smichr)

    • Error message for differentiation wrt bad variable no longer raised if the count is 0 and no longer refers to the count (#15049 by @smichr)

    • Error message for differentiation wrt variable that has a negative count (#15049 by @smichr)

    • Derivative has canonical property which returns Derivative with variable_count canonically sorted (#15049 by @smichr)

    • Derivative.variables is not a reliable way to see which are the variables of differentiation: it gives an expanded list of those variables, e.g f(x,y).diff(x,2,y).variables -> (x,x,y) or raises an error if some order of differentiation is symbolic, e.g. f(x).diff(x,y).variables -> TypeError (#15049 by @smichr)

    • Derivative has _wrt_variables which lists, in order, the variables of differentiation, even if the count is symbolic. (#15049 by @smichr)

    • Defined function and non-elementary derivatives (like Derivative(f(g(x)), x)) give False for _diff_wrt (#15049 by @smichr)

    • Subs involving Subs now give a result that should be the same whether doit is applied before or after the subs, e.g. Subs(x*y, x, x + 1).subs(x, y).doit() == Subs(x*y, x, x + 1).doit().subs(x, y) (#15049 by @smichr)

    • A change of symbols is now possible with Subs so Subs(x, x, 1).subs(x, y) -> Subs(y, y, 1) (#15049 by @smichr)

    • Function.fdiff returns Subs less often, e.g. f(g(x)).diff(x) no longer creates a Subs instance (#15049 by @smichr)

    • Expr has a default attribute is_scalar=True which makes Expr().diff(Expr()) == 1 (#15049 by @smichr)

    • Bug involving derivatives of non-commutative expressions is fixed (#15049 by @smichr)

    • Mul now implements the nth derivative in terms of multinomials (#15049 by @smichr)

    • piecewise_fold is canonical wrt ordering of final Piecewise arguments (#15049 by @smichr)

    • Piecewise uses information from Eq or And conditions to simplify the corresponding expression, e.g. (f(x), Eq(x, 0)) -> (f(0), Eq(x, 0)) (#15049 by @smichr)

    • BooleanFunction has simplify method (#15049 by @smichr)

    • And will simplify args of type Eq and Ne when simple opportunities are presented, e.g. And(Eq(x, 0), Eq(x, y)) -> And(Eq(x, 0), Eq(y, 0)) (#15049 by @smichr)

    • dummy_eq now compares expressions with canonical dummy variables (#15300 by @smichr)

    • canonical_variables now returns non-clashing Symbols with simple names (#15300 by @smichr)

    • The new part of subs args are now sympified as in 1.0 (#15371 by @smichr)

    • Added proper passing of H0 in public rewrite method (#15314 by @arunsin019 and @arunsin997)

    • Added parameter in all public _eval_rewrite_as_Piecewise methods (#15314 by @arunsin019 and @arunsin997)

    • kwargs are now passed to all rewrite methods (#15317 by @smichr)

    • Eq._eval_rewrite_Add has been defined (#15317 by @smichr)

    • Fixed bug that occurred when integrating certain functions over an interval (#15295 by @apalmer1377)

    • Derivative._sort_variable_count is more canonical and preserves the order of derivatives and symbols when necessary (#15241 by @smichr)

    • factor(F(x)*F(y) - F(y)*F(x)) != 0 now for F = Function('F', commutative=False) (#15232 by @raineszm)

    • _atomic can recurse into arguments (#15242 by @smichr)

    • sympify keyword arguments now work properly when sympifying NumPy types (#15099 by @asmeurer)

    • Application will recurse into args to do subs (#15222 by @smichr)

    • Subs.has gives structural (not mathematical) answer (#15222 by @smichr)

    • Subs(Subs(...)) will denest (#15222 by @smichr)

    • Subs hash includes null subs information (#15222 by @smichr)

    • FunctionClass no longer raises an error when trying to do xreplace (#15049 by @smichr)

  • crypto

    • Improved speed for rsa_public_key and rsa_private_key (#16162 by @sylee957)

    • Raise deprecation warning if same prime numbers are given to rsa_public_key and rsa_private_key (#16162 by @sylee957)

    • Added Blum Goldwasser cryptosystem (#15825 by @czgdp1807)

  • diffgeom

    • better removal of dummies from expressions involving derivatives (#15049 by @smichr)
  • functions

  • geometry

  • holonomic

  • integrals

    • Fix connector to new version of MatchPy. (#16356 by @asmeurer and @Upabjojr)

    • Fix AssertionError in heurisch.py (#16021 by @FrackeR011)

    • Added functionality to pass both Polygon type object and a list to point_sort in intpoly.py (#15846 by @sharma-kunal and @smichr)

    • Added a flag heurisch to integrate. It can be used to disable the parallel/heuristic Risch algorithm, or to use this algorithm exclusively. (#15672 by @normalhuman)

    • Improved the logic of substitutions involving logarithms (#15641 by @normalhuman)

    • Added standard non-elementary antiderivatives to manualintegrate. (#15619 by @normalhuman)

    • adjusted the logic of Abs->Piecewise rewrite for definite integrals (#15602 by @normalhuman)

    • expanded the options for power substitution u = x**k in manual integration (#15600 by @normalhuman)

    • prevented creation of infinite chains of integration by parts (#15576 by @normalhuman)

    • manual integration algorithm is prevented from making infinite circular substitutions (#15565 by @normalhuman)

    • Applying integrate to an Equality object integrates both sides. (#15530 by @normalhuman and @smichr)

    • Fixed a bug in the handling of convergence conditions in some integral transforms. (#15541 by @normalhuman)

  • interactive

    • By default, LaTeX output in the Jupyter notebook is framed with $\displaystyle ...$. This prevents it from being centered in PDF output from nbconvert (see https://github.com/jupyter/notebook/issues/4060). (#15625 by @mgeier)

    • SymPy objects now render as LaTeX automatically in the Jupyter notebook. init_printing() is still required to make Python builtin numeric types (such as int and float) render as LaTeX, Python container types (such as list and dict) containing SymPy objects render as LaTeX, to change the printer settings, or to get LaTeX printing in the qtconsole. (#15368 by @asmeurer)

    • The latex_mode flag of init_printing() now works in the notebook (#15367 by @asmeurer)

    • The default latex_mode in the notebook is now 'equation*' (previously it was 'plain'). This makes some expressions, such as definite integrals, render slightly larger. (#15367 by @asmeurer)

  • logic

    • SOPform and POSform can now use integers and dicts to indicate terms. (#16133 by @oscargus)

    • Boolean simplification algorithm fixed to reduce the number of terms. (#16133 by @oscargus)

    • Improved simplification of Boolean functions with relations in them (#15912 by @oscargus)

    • simplify_logic now has a limit of 8 variables, which can be overridden by setting force=True. (#16134 by @oscargus)

    • boolmap differentiations between Xor(x, y) and ~Xor(x, y) (#15225 by @smichr)

  • matrices

    • MatrixSymbol.args[0] is now a Symbol instead of a string. MatrixSymbol.name is still a string. (#15121 by @asmeurer and @smichr)

    • fixing some common bugs with derivatives of matrix expressions. (#16408 by @Upabjojr)

    • Uncomment matrix derivative test w.r.t Trace. (#16372 by @Upabjojr)

    • Added a new function rank_decomposition. (#16209 by @smichr and @sylee957)

    • Improved speed for singular_values for matrices (#16238 by @sylee957)

    • Changed keywords for jordan_block explicit. Note that these will become keyword-only in the future when SymPy drops Python 2 support. (#16102 by @smichr and @sylee957)

    • Improved the documentation of jordan_block (#16102 by @smichr and @sylee957)

    • Raise ValueError when keyword arguments 'eigenval' and 'eigenvalue' have inconsistent value. (#16102 by @smichr and @sylee957)

    • Fixed diagonalize and is_diagonalizable giving wrong results for mutable matrices. (#15887 by @sylee957)

    • Fixed possible cases where jordan_form can compute wrong result. (#15868 by @sylee957)

    • LUsolve() will raise NotImplementedError for rank-deficient square matrices (#16077 by @sylee957)

    • gauss_jordan_solve() accepts B with multiple columns (#16063 by @dandiez)

    • _eval_Eq added for MatExpr (#16052 by @divyanshu132 and @smichr)

    • MatAdd() and MatMul() now return generic zero and identity matrices with no specified shape. (#15994 by @asmeurer)

    • improve docstring of matrices.py (#15950 by @divyanshu132)

    • degenerate explicit matrices no longer raise an exception when raised to a symbolic power (#15712 by @jmig5776)

    • Added more methods LU, QR, PINV, LDL, CH for Matrix.solve (#15866 by @sylee957)

    • rankcheck in LUdecomposition_Simple correctly raises ValueError when the last row is found rank deficient. (#15794 by @sylee957)

    • Modified QRdecomposition to handle rank-deficient matrices and matrices with more columns than rows. (#15722 by @sylee957)

    • Fix unused return value of 'cancel' in bareiss leading to a hang with certain determinants. (#15752 by @ehren)

    • Fixed wrong results on performing .normalized on zero vectors (#15739 by @sylee957)

    • Added options for solve_least_squares to select more methods. (#15727 by @smichr and @sylee957)

    • fixing derivative of trace of matrices for some special cases. (#15695 by @Upabjojr)

    • Added elementwise application of functions to matrix expressions. (#15627 by @Upabjojr)

    • Derivatives of matrix expressions do not rely on indexed expressions anymore. The algorithm now calculates the result implicitly. (#15615 by @Upabjojr)

    • KroneckerProduct._entry now works with matrices with symbolic shapes (#15562 by @asmeurer)

    • Extend pinv() with the implementation for rank deficient matrices. (#15475 by @klaasvanaarsen)

    • matrix expressions involving transpose and powers are now automatically reduced (#15404 by @sidhantnagpal)

    • Transponse(A*B)**5 now requires invocation of .doit() method to carry out reductions (#15404 by @sidhantnagpal)

    • Added support for overdetermined systems to LUsolve (#15485 by @normalhuman)

    • dot function can also calculate hermitian inner product. (#15393 by @amsuhane and @cbm755)

    • Cholesky and LDL decompositions are now available in their non-Hermitian form: representing a symmetric matrix by the product of a lower triangular matrix and its transpose. (#15473 by @normalhuman)

    • improve speed of .solve() in matrices.py (#15341 by @FrackeR011)

    • Reverts backwards incompatible change introduced in SymPy 1.2 and 1.3 for matrix differentiation and moves Matrix by Matrix differentiation to expected to fail. (#15390 by @moorepants and @Upabjojr)

    • fixed tools like expand( ) on matrix expressions. (#15373 by @Upabjojr)

    • Added missing docs from matrices.py (#15272 by @sylee957)

    • MatrixExpr operations via *, **, + or .doit() produce more simplified expressions (#15142 by @valglad)

    • Inverse.args are a 2-tuple (matrix, -1) to be consistent with MatPow (#15142 by @valglad)

    • Keep inverses in matrix expressions unexpanded with keyword inv_expand; for example, Inverse(A*B).doit() == B**-1*A**-1 but Inverse(A*B).doit(inv_expand=False) == (A*B)**-1 (#15142 by @valglad)

    • Added iszerofunc parameter for _eval_det_bareiss() (#15207 by @sylee957)

  • ntheory

  • parsing

    • Fix some issues in parse_expr/sympify caused by changes to the standard library tokenize module (#15523 by @asmeurer)
  • physics.continuum_mechanics

  • physics.optics

    • Added two new functions to physics.optics.utils:
    1. critical_angle() calculates the onset of total internal reflection, "TIR" when possible (n2 < n1)
    2. fresnel_coefficients() calculates real reflection and transmission coefficients when out of TIR and complex ones when the ray is TIR'ed (#16057 by @Trave11er)
  • physics.paulialgebra

    • added the option to change the symbol representing the Pauli matrices (#15761 by @mikelRM)

    • made pauli matrices hermitian (#15755 by @mikelRM)

  • physics.quantum

  • physics.units

  • physics.unitsystems

  • physics.vector

  • plotting

    • pygletplot is working again, although there seems to be issues on OS X. (#16513 by @asmeurer and @oscargus)

    • Now if backend use_python_math is True then complex_wrap_evalf will be False.

      (#15786 by @jmig5776)

    • Added explicit optional arguments to plot_implicit and improved/corrected the documentation (#15756 by @oscargus)

    • fixed a issue of logarithmic plot (#15607 by @jmig5776)

    • Added outputs to all plotting examples in the sphinx docs. (#15366 by @iamprayush)

    • changed extend example and added new plots (#15357 by @iamprayush)

    • added an example output to the sphinx documentation (#15347 by @iamprayush)

    • Fixed xlim and ylim from plot() not properly handling sympy's number classes. (#15265 by @sylee957)

  • polys

  • printing

    • Units are printed in a slightly better format in the LaTeX printer (#16514 by @oscargus)

    • srepr now correctly prints subclasses of Add and Mul. (#15121 by @asmeurer and @smichr)

    • Fixed mathematica_code mutating the dictionary passed to the argument userfuncs (#16309 by @sylee957)

    • Fixed mathematica_code ignoring list items passed to userfuncs. (#16309 by @sylee957)

    • Added LaTeX, MathML presentation, and pretty printing of Laplacian (#16293 by @oscargus)

    • Added LaTeX, MathML presentation, and pretty printing of bell, bernoulli, fibonacci, lucas, and tribonacci numbers (#16293 by @oscargus)

    • Added printing methods for elliptic_e, elliptic_f, elliptic_pi, Ei, expint, jacobi, gegenbauer, chebyshevt, chebyshevu, legendre, assoc_legendre, laguerre, assoc_laguerre and hermite type objects for MathML presentation printer (#16284 by @pragyanmehrotra and @smichr)

    • change numpy matmul function. This fixes things like lambdify(A, 2*A) where A is a MatrixSymbol. (#15953 by @RituRajSingh878)

    • improved pretty printing of PI used for product of series (#16281 by @AnimeshSinha1309)

    • Added support for printing MatrixElement type objects for MathML presentation printer (#16271 by @pragyanmehrotra)

    • Added MathML presentation printing for nan and zoo (#16274 by @oscargus)

    • Added MathML presentation printing for matrix functions (e.g. Adjoint) and special matrices (e.g. Identity) (#16274 by @oscargus)

    • Added MathML presentation printing for SingularityFunction (#16274 by @oscargus)

    • Many functions with single character representations added to MathML Presentation printer (#16099 by @oscargus and @smichr)

    • Better MathML presentation printing of Float (#16099 by @oscargus and @smichr)

    • Infinite Range objects no longer pretty print as if oo were included in the set. (#16270 by @asmeurer)

    • \text is consistently used instead of \mathrm in LaTeX printer to get non-italic text. (#16056 by @oscargus)

    • Added option to select output format for re and im in LaTeX printer: gothic_re_im (#16056 by @oscargus)

    • MathML presentation printing of classes in sympy.vector (#16214 by @oscargus)

    • Added support for DenseNDimArray and SparseNDimArray for mathematica_code (#16221 by @sylee957)

    • printing C code for Min and Max objects with many arguments is much faster (#15617 by @clyring and @MaltNCigars)

    • MathML Presentation printing of integrals improved. (#16210 by @oscargus)

    • Corrected LaTeX and pretty printing of Gradient (#16211 by @oscargus)

    • Added MathML presentation printing for Range, Min, Max, exp, true, false, None (#16126 by @oscargus)

    • Added MathML presentation printer method for printing Indexed objects (#16106 by @pragyanmehrotra)

    • Added MathML presentation printer method for printing IndexedBase objects (#16106 by @pragyanmehrotra)

    • Added MathML presentation printer methods for printing tuple objects (#16106 by @pragyanmehrotra)

    • Added Lambda, floor, ceiling and exp functions to the mathml printer (#16139 by @shubhamabhang77)

    • Issue with printing of minus signs in MathML presentation printer corrected. (#16141 by @oscargus)

    • MathML printing pf negative powers more consistent with LaTeX output. (#16141 by @oscargus)

    • Fixed mathematica_code printing ComplexInfinity as zoo (#16128 by @sylee957)

    • Fixed mathematica_code printing Indeterminate as nan (#16128 by @sylee957)

    • Fixed mathematica_code printing TribonacciConstant as TribonacciConstant, now uses explicit formula. (#16128 by @sylee957)

    • mathematica_code will give warning (* Not supported in Wolfram Language: *) for classes not implemented or not printable. (#16128 by @sylee957)

    • Added the Fold_frac_powers and fold_short_frac flags to the mathml presentation printer (#16075 by @shubhamabhang77)

    • Added MathML presentation printer for re, im, Abs, Determinant, Interval, and Tuple (#16065 by @oscargus and @smichr)

    • MathML presentation printing for logic functions (And, Or, etc) (#16047 by @oscargus and @smichr)

    • MathML presentation printing for set functions (Union, Intersection, etc.) and FiniteSet (#16047 by @oscargus and @smichr)

    • MathML presentation printing for polylog and lerchphi (#16047 by @oscargus and @smichr)

    • remove one useless assignment (#16072 by @fchapoton)

    • Presentation MathML printing for factorial, binomial, and conjugate (#16069 by @oscargus)

    • Added support for printing domains in the MathML presentation printer (#16037 by @oscargus)

    • changed the print order of additions of form k - expr (used to print as -expr + k) (#15985 by @nickovs)

    • Added to ln_notation and mul_symbol flag to mathml presentation printer. (#16017 by @shubhamabhang77)

    • MathML presentation printer now generates correct sub- and superscripts. (#15976 by @oscargus)

    • LaTeX-printing of ConditionSetwith FiniteSet now works. (#15978 by @oscargus)

    • LaTeX printer can now print sequences with symbolic bounds (#15980 by @oscargus)

    • Corrected and improved MathML presentation printing of multiple derivatives. (#16003 by @oscargus)

    • Added the mat_delim flag in presentation printer of mathml. (#15991 by @shubhamabhang77)

    • New Latex, pretty, and MathML printer option mat_symbol_style which when set to 'bold' leads to MatrixSymbol printed as bold (#15891 by @oscargus and @smichr)

    • MatrixSymbol and RandomSymbol now prints better for MathML (#15891 by @oscargus and @smichr)

    • better (smaller) spacing when generating LaTeX for lists, tuples, and dicts. (#15970 by @asmeurer and @oscargus)

    • Representation of the imaginary unit, I in sympy, can be redefined in the LaTeX-printer through the optional argument imaginary_unit. Default is "i". (#15936 by @oscargus)

    • Added the flag root_notation to the MathML printerchanges made in mathml.py. If set to False, exponents of the form 1/n are printed in fractional form. It is set as True (default), the exponents are printed in root form. (#15901 by @oscargus and @shiksha11)

    • change numpy matmul function. This fixes things like lambdify(A, 2*A) where A is a MatrixSymbol. (#15835 by @RituRajSingh878)

    • Corrected Unicode symbols for three and four dots above in pretty printer (dddot and ddddot modifiers) (#15892 by @oscargus)

    • Modifier is now put on the middle character in case of multi-character symbol names (#15892 by @oscargus)

    • add init to MathMLPresentationPrinter (#15906 by @Bavish2201)

    • MathML printer now has a working fallback for Basic (#15814 by @oscargus)

    • Fortran printer for FunctionPrototype does not give a syntax error anymore (although an exception as multiline prining is not yet supported) (#15814 by @oscargus)

    • Fixed PyCode printer for sequences (#15814 by @oscargus)

    • changes made in latex.py and pretty.py. Root_notation in both latex.py and pretty.py has boolean datatype. If set as False, exponents of the form 1/n are printed in fractonal form.It is set as True by default printing the exponents in root form. (#15842 by @oscarbenjamin and @shiksha11)

    • test for NumPy matrix multiply (#15687 by @RituRajSingh878)

    • Code printers will properly behave for sparse matrices, if not supported (#15791 by @sylee957)

    • LaTeX printing now consistently does not use a space after \left and \right (#15779 by @oscargus)

    • When printing to LaTeX, ceiling, floor, <> and Dirac ket |a>now always add \left and \right (#15780 by @oscargus)

    • mathematica_code can print dense and sparse matrices (#15792 by @sylee957)

    • catch ValueError from unevaluated integrals (#15719 by @RituRajSingh878)

    • pretty printer (#15686 by @RituRajSingh878)

    • use \documentclass{standalone} by default when using LaTeX to render expressions (#15679 by @mgeier)

    • Changed printing using str() and repr() of S.Integers, S.Reals, S.Naturals and S.Naturals0 to the names of the sets themselves (#15635 by @AnimeshSinha1309)

    • Added support for orthogonal polynomials to SciPy code printer (#15656 by @normalhuman)

    • correctly matches Bessel functions to SciPy analogues in SciPy code printer (#15613 by @normalhuman)

    • fixed MatrixElement printers for the cases with special indices. (#15609 by @Upabjojr)

    • MatMuls with KroneckerProducts now parenthesize correctly (#15592 by @rationa-kunal)

    • MatrixSymbol powers and inverses are printed as the corresponding NumPy methods (#15586 by @normalhuman)

    • Fix omission of necessary parentheses with MatMul (#15446 by @JMSS-Unknown and @Upabjojr)

    • additions to the tensorflow printers. (#15462 by @Upabjojr)

    • added more NumPy printers for objects in sympy.codegen.array_utils (#15452 by @Upabjojr)

    • Fix latex printing of ProductSet when exponent has more than one digit (#15456 by @jlumpe)

    • added a method to correctly LaTeX print the trace of a MatrixSymbol (#15308 by @ethankward)

    • fixed a bug in LaTeX.py where subexpressions of an unimplemented basic expression were not printed correctly (#15308 by @ethankward)

    • added Mathematica code printers for Max and Min (#15345 by @ajdunlap)

    • Fixed NumPyPrinter._print_im (#15401 by @bjodah and @ViacheslavP)

    • Improved performance of function printing in the code printers. (#15379 by @moorepants)

    • add theano printing for MatPow (#15142 by @valglad)

    • Subs with singleton args prints without wrapping variable/point as tuple (#15244 by @smichr)

    • added LaTeX printers for tensors. (#15251 by @Upabjojr)

    • Added Mod to the supported Fortran functions. (#15231 by @moorepants)

    • unicode printers for tensorial expressions (#15249 by @Upabjojr)

    • Added scalar=True option to theanocode.theano_function to create a function which returns scalars instead of 0-dimensional arrays. (#14949 by @jlumpe)

  • series

    • Improves fourier.FiniteFourierSeries class (#16131 by @ShubhamKJha)

    • catch ValueError from core in limit. (#16157 by @divyanshu132)

    • added a check for finite fourier series in fourier_series (#15979 by @asmeurer and @ShubhamKJha)

    • Improved the computation of limits of oscillating sequences (#15646 by @normalhuman)

    • Limit computation no longer falls back on sequential limits. Previously undocumented parameter sequence of Limit.doit() is removed. Use limit_seq for limits of sequences. (#15569 by @normalhuman)

    • The limits of Fresnel integrals at infinity are now correct. (#15549 by @normalhuman)

    • Implemented order at negative infinity: O(expression, (x, -oo)). (#15540 by @normalhuman)

    • Fixed a bug in the computation of Taylor series of expressions with a fractional power of the variable. (#15521 by @normalhuman)

    • The orders of magnitude O(x**n, (x, oo)) are now correctly compared to each other with Order.contains. (#15476 by @normalhuman)

    • added a heuristic method for solving indefinite forms in limits (#14939 by @maurogaravello)

    • implemented expression-based recursive sequence class (#15184 by @rwbogl)

  • sets

    • Union and Intersection now work with Python sets as input. (#16344 by @asmeurer)

    • Union and Intersection no longer automatically denest arguments. This means to pass a list or generator to Union/Intersection, you must use Union(*list_of_sets). (#16344 by @asmeurer)

    • Union and Intersection now subclass from LatticeOp. (#16344 by @asmeurer)

    • Handle non-set objects in Eq with Interval or FiniteSet. (#16344 by @asmeurer)

    • fix an infinite recursion issue that could occur taking the intersection of finite sets with symbolic elements. (#16344 by @asmeurer)

    • Intersection no longer returns an object with an unnecessary UniversalSet in some cases (for instance, Intersection(FiniteSet(0, x), FiniteSet(x, y)) now returns FiniteSet(x, 0) instead of Union({x}, Intersection(FiniteSet(0), UniversalSet()))). (#16344 by @asmeurer)

  • simplify

  • solvers

    • Fix linear_eq_to_matrix on distributed terms. (#16578 by @cbm755)

    • Rename order_reducible to nth_order_reducible (#16399 by @oscarbenjamin)

    • check for variable number of functions and equations in ode.py (#16168 by @divyanshu132)

    • dsolve can now choose from multiple general solutions based in initial conditions. (#16170 by @sharma-kunal)

    • dsolve, constantsimp and odesimp no longer renumber inregration constants found in the original ODE. (#16012 by @oscarbenjamin, @saurabhkgp21, and @smichr)

    • replaced var[0] with v1[0] in diophantine.py (#16117 by @FrackeR011)

    • New reducible hint in dsolve to solve ODEs that only depend on derivatives of the dependent variable by substitution. (#15992 by @oscarbenjamin, @smichr, and @XtremeGood)

    • fix nth_algebraic solver so it doesn't clobber integration constants from the source ODE. (#16008 by @oscarbenjamin)

    • checkodesol is more robust when checking solutions involving Integrals (#15957 by @jmig5776, @oscarbenjamin, and @smichr)

    • Added support for solving some special types of exponential equations (#15735 by @jmig5776 and @smichr)

    • Raise NonImplementedError when solveset fails with polynomials over inexact domain. (#15895 by @sharma-kunal)

    • Return the correct RootOf form of solution for constant coefficient ODEs with unsolvable characteristic polynomials. (#15645 by @oscarbenjamin)

    • get_numbered_constants in dsolve now considers functions, in case you have a function named, for example, C1(t). (#15504 by @avishrivastava11)

    • nsolve accepts a SymPy Matrix as the initial guess. (#15529 by @normalhuman)

    • dsolve now raises NotImplementedError instead of IndexError for a particular type of invalid ODE. (#15430 by @oscarbenjamin)

    • fix solving linear ODEs with constant irrational coefficients (#15408 by @oscarbenjamin)

    • dsolve now rescales ODEs so that the Euler solver can be used in more cases (#15434 by @oscarbenjamin)

    • Add an 'nth_algebraic' solver for ODEs that can be solved by algebra and integration (#15255 by @oscarbenjamin)

    • improved checkodesol handling of expressions with unexpanded derivatives (#15290 by @oscarbenjamin)

    • Fixed a bug where dsolve would return no solutions to a linear system of n first order ODEs (#15326 by @sirnicolaf)

    • linear_coeffs returns list of coeffs by default instead of dict (#15317 by @smichr)

    • improved _invert method to help solver to solve 2-D linear system (#15315 by @ayushmankoul)

    • linear_coeffs added to solveset (#15212 by @czgdp1807 and @smichr)

    • nonlinear terms encountered by linear_eq_to_matrix will raise an error; repeated symbols and non-symbols will also raise an error (#15212 by @czgdp1807 and @smichr)

    • as a convenience, linear_eq_to_matrix now accepts a single Expr as its first argument. (#15212 by @czgdp1807 and @smichr)

  • stats

  • tensor

  • utilities

    • make variable names in generated cython code unique (#16331 by @anpandey)

    • Test runner no longer forces __future__ division so that the test behaviour is the same under the runner as when imported normally. (#15587 by @oscarbenjamin)

    • strlines added: prints a string into shorter lines in a format that can be copied and used in an equality test (#16253 by @smichr)

    • Added a function unchanged which evaluates if expression is changed or not (#16189 by @supreet11agrawal)

    • rotations function added to iterables.py (#16136 by @divyanshu132 and @smichr)

    • added high-level documentation to the docstring of lambdify to help clarify what it does and how it works. (#13485 by @asmeurer)

    • Make doctests runnable under pytest with doctestplus (#15768 by @oscarbenjamin)

    • Make Sympy's tests runnable under pytest. (#15720 by @oscarbenjamin)

    • Added context manager TmpFileManager and decorator function cleanup_tmp_files in a new module tmpfiles.py. (#15354 by @sylee957)

    • Make tests compatible with pytest (#15577 by @oscarbenjamin)

    • Added new utilities for handling warnings in tests. These have been used for a general clean up of warning handling code in the tests. (#15503 by @oscarbenjamin and @smichr)

    • Fix unintentional int division across the test suite (#15515 by @oscarbenjamin)

    • made SympyDeprecationWarning picklable so tests can be run in subprocesses (#15506 by @oscarbenjamin)

    • Fixed regression with autowrap helpers kwarg. (#15391 by @moorepants)

    • lambdify and lambdastr now work with Derivative (#15382 by @SirJohnFranklin and @smichr)

    • lambdastr will detect if dummify should be true; override by setting dummify=False (#15382 by @SirJohnFranklin and @smichr)

    • ordinal will convert an int to its ordinal representation, e.g. 12 -> 12th (#15247 by @smichr)

  • vector

  • other

Authors

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

Thanks to everyone who contributed to this release!

  • 2torus*
  • Shubham Abhang*
  • adhoc-king*
  • Saurabh Agarwal
  • Supreet Agrawal*
  • Alkiviadis G. Akritas
  • [email protected]*
  • amsuhane*
  • Fredrik Andersson*
  • azure-pipelines[bot]*
  • Fabian Ball
  • Oscar Benjamin
  • Parker Berry*
  • Marduk Bolaños*
  • Francesco Bonazzi
  • Ondřej Čertík
  • Frédéric Chapoton*
  • Matthew Craven*
  • Björn Dahlgren
  • damianos*
  • dandiez*
  • Nabanita Dash*
  • Prayush Dawda*
  • Robert Dougherty-Bliss*
  • Alexander Dunlap*
  • Zachariah Etienne*
  • [email protected]*
  • eward
  • Isuru Fernando
  • Mauro Garavello
  • Matthias Geier*
  • Noumbissi valere Gille Geovan*
  • Valeriia Gladkova
  • Brian E. Granger
  • Andrey Grozin*
  • Nicolás Guarín-Zapata
  • Gaetano Guerriero*
  • Oscar Gustafsson*
  • Daniel Ingram*
  • Susumu Ishizuka*
  • Alpesh Jamgade*
  • Shubham Kumar Jha*
  • jhanwar*
  • JMSS-Unknown
  • Yathartha Joshi
  • kkkkx*
  • klaasvanaarsen*
  • Shivani Kohli*
  • Ayushman Koul
  • Leonid Kovalev
  • Bavish Kulur*
  • Ritesh Kumar*
  • S.Y. Lee
  • Vera Lozhkina*
  • Jared Lumpe
  • Colin B. Macdonald
  • Vishesh Mangla*
  • Pragyan Mehrotra*
  • Ehren Metcalfe
  • Aaron Meurer
  • Jogi Miglani*
  • Sudhanshu Mishra
  • Mohitbalwani26*
  • Jason Moore
  • Sidhant Nagpal
  • Takumasa Nakamura*
  • Abdullah Javed Nesar
  • Austin Palmer
  • Ankit Pandey*
  • Samnan Rahee*
  • Zach Raines
  • rationa-kunal*
  • Faisal Riyaz*
  • Martin Roelfs*
  • Mikel Rouco*
  • Safiya03*
  • Stan Schymanski
  • Rohit Sharma*
  • sharma-kunal*
  • shiksha11*
  • Avi Shrivastava
  • Jason Siefken
  • Jashanpreet Singh
  • Gagandeep Singh
  • Ritu Raj Singh*
  • Arun Singh*
  • Rajiv Ranjan Singh*
  • Animesh Sinha*
  • SirJohnFranklin*
  • sirnicolaf*
  • Gleb Siroki
  • Chris Smith
  • Nicko van Someren*
  • Anthony Sottile*
  • Bhavya Srivastava*
  • Kalevi Suominen
  • Gaurang Tandon*
  • Nimish Telang
  • Divyanshu Thakur*
  • Martin Ueding*
  • ViacheslavP*
  • Ethan Ward
  • Jonathan Warner*
  • whitesource-bolt-for-github[bot]*