Skip to content

Release Notes for 1.5

SymPy Bot edited this page Apr 23, 2019 · 69 revisions

These are the release notes for SymPy 1.5.

SymPy 1.5 has not been released yet.

This version of SymPy has been tested on Python 2.7, 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.

Install SymPy with

pip install -U sympy

or if you use Anaconda

conda install sympy

Highlights

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.

Backwards compatibility breaks and deprecations

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

Changes

  • assumptions

    • 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

    • Added a function stationary_points to find stationary points of an expression in a given domain (#16473 by @supreet11agrawal)

    • Added functions minimum and maximum to find minimum and maximum values of an expression in a given domain (#16473 by @supreet11agrawal)

  • codegen

  • combinatorics

  • core

    • round added to compatibility (#16608 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)
  • crypto

  • external

    • Use LooseVersion instead of StrictVersion for checking external module dependencies (#16570 by @mgeier)
  • functions

  • geometry

    • improved response time of 2D Line/Segement interactions and Segment containment of Point (#16668 by @smichr)
  • integrals

  • matrices

    • Allow matrix expressions to be derived by a scalar. (#16693 by @Upabjojr)

    • remove duplicated test. (#16683 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 so ones(2) % 2 -> ones(2) (#16454 by @smichr)

    • method diagonal extracts the kth diagonal like row and col extract the kth row or column. (#16454 by @smichr)

    • added support for Hadamard (i.e. elementwise) power of matrices. (#16443 by @Upabjojr)
    • 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)

    • fixing bug when deriving a single vector. (#16401 by @Upabjojr)

    • fixing bug with derivative in case of scalar multiplying trace. (#16397 by @Upabjojr)

    • additions to derivatives of expressions to handle the derivative of the trace of a matrix. (#15723 by @Upabjojr)

  • parsing

    • Fixed parse_expr not correctly parsing numeric strings to numbers if split_symbols is configured in transformations (#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

    • plot_loading_results() now uses sympy's PlotGrid class to obtain subplots related to the beam. (#16636 by @ishanaj)
  • physics.optics

    • modified two functions in physics.optics.utils, namely: refraction_angle() and deviation() 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.units

  • plotting

    • plotting module can now create subplots i.e can plot more than one plot in a single figure using PlotGrid (#16276 by @ishanaj)
  • polys

    • Remove leading term created by rounding error in long division (#16596 by @jksuom)

    • Define is_Exact and get_exact methods for FractionField (#16596 by @jksuom)

  • printing

    • Added printing of UniversalSet() for LaTeX ,pretty, MathML presentation, and str printers. (#16631 by @oscargus)

    • added LaTeX printers for class OneMatrix. (#16692 by @Upabjojr)

    • Fixed alignment of expressions inside sums in pretty printer (#16503 by @anpandey)
    • Add support for HadamardProduct in mathml presentation printer. (#16483 by @sylee957)

    • pretty printing of BaseScalar and BaseVector matches the latex form with CoordSys as subscript (#16422 by @kangzhiq and @smichr)

  • series

  • simplify

  • stats

  • tensor

    • Make the 'indices' parameter in .replace_with_arrays optional. (#16493 by @kangzhiq)
  • other

Authors

Clone this wiki locally
You can’t perform that action at this time.