Release Notes for 1.3 - sympy/sympy GitHub Wiki

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

SymPy 1.3 was released on September 14, 2018.

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.

Install SymPy with

pip install -U sympy

or if you use Anaconda

conda install sympy

Starting with this release, the release notes are written by pull request authors in the pull request description and automatically compiled using a bot.

Backwards compatibility breaks and deprecations

  • Symbols no longer automatically convert to functions when called, e.g., if f = Symbol('f'), f(t) is now a TypeError. To create a function, use f = Function('f') or f = symbols('f', cls=Function).

  • .integrate() has been renamed to .compute_expectation() in sympy.stats in order to avoid confusion with the integrals module.

  • classof() and a2idx() in sympy.matrices.matrices have been deprecated in favor of the same functions in sympy.matrices.common (#15109).

  • The source() function has been deprecated. Use inspect.getsource or ?? in IPython instead. (#14905).

Major Changes

  • codegen

    • CodePrinter and subclasses can generate code for unknown Functions if the new option allow_unknown_functions=True is passed. (#15085 by @bjodah, #15215 by @cbm755)

    • Octave/Matlab printing supports more functions and has better test coverage. (#14821 by @cbm755)

    • made Octave printing of the two-argument zeta function unsupported, as it differs from SymPy's definition (#14962 by @ethankward)

  • combinatorics

    • CosetTable.coset_table_max_limit is no longer overwritten when max_cosets keyword is used (#15167 by @valglad)

    • It is now possible to get the injection of the group returned by subgroup into the parent FpGroup (#14968 by @RavicharanN)

  • core

    • Singleton classes with the same name that are defined twice now properly re-register on the S object. (#15163 by @asmeurer)

    • Fix an issue with undefined functions defined with a custom eval (like Function('f', eval=...)). (#15174 by @asmeurer)

    • fix bug in sympify.kernS (#15143 by @smichr)

    • Symbol f no longer automatically becomes a Function in f(x). (#9064 by @cbm755 and @skirpichev)

    • fixed a bug in the simplification of inverses, such as simplify(log(exp(x)), inverse=True). (#15033 by @normalhuman)

    • fixed a wrong result with certain multivariable derivatives like f(x, y).diff(y, y, x, y, x) (#15008 by @asmeurer)

    • fixed a bug about commutativity of Mul with AccumBounds (#14990 by @maurogaravello)

  • discrete

    • added mobius_transform and inverse_mobius_transform methods to discrete.transforms (#14853 by @sidhantnagpal)

    • added convolution_subset method and subset keyword in convolution method (#14878 by @sidhantnagpal)

    • added covering_product method in convolution submodule (#14928 by @sidhantnagpal)

    • added intersecting_product method in convolution submodule (#14954 by @sidhantnagpal)

    • rename the submodules discrete.convolution and discrete.recurrence to discrete.convolutions and discrete.recurrences, respectively. (#14969 by @sidhantnagpal)

  • functions

    • UndefinedFunctions which coincidentally match known functions no longer evaluate numerically (#15095 by @cbm755)

    • Piecewise with no arguments not allowed anymore (#15010 by @ramvenkat98)

    • Piecewise evaluated with no matching conditions gives nan (#15010 by @ramvenkat98)

    • fixed a bug with evalf for RisingFactorial and FallingFactorial (#14955 by @ramvenkat98)
  • integrals

  • interactive

    • init_printing() no longer LaTeX prints builtin container types that have custom printers (like sys.flags). (#14618 by @asmeurer)
  • matrices

    • added implementation of IndexError for non int-indices inrow_insert() and col_insert() (#15155 by @avishrivastava11)
    • Added iszerofunc parameter for nullspace() and eigenvects() (#15169 by @sylee957)
    • Fixed simplify flag not working in eigenvals() (#15125 by @sylee957)

    • derivative of trace of matrix now returns the correct result. (#15128 by @Upabjojr)

    • Added missing square matrix check in eigenvals() (#15119 by @sylee957)

    • Deprecated copies of a2idx() and classof() found in matrices.py (#15108 by @sylee957)
  • parsing

    • Made changes to _listener_autolev_antlr in parsing.autolev. Revamped the processVariables function quite a bit. Changed the mass function and the pydy output code a bit followed by some minor changes. Made some minor changes to other files in parsing.autolev. (#15006 by @NikhilPappu)

    • Also changed some code in tests/test_autolev.py (Added commented test code for the GitLab repo tests and changed zip to zip_longest which is more correct. (#15006 by @NikhilPappu)

    • Added a submodule autolev which can be used to parse Autolev code to SymPy code. (#14758 by @NikhilPappu)
  • physics.continuum_mechanics

    • Beam3D can now solve for reaction loads (#15068 by @jashan498)

    • Beams with variable second moment(or elastic modulus) can now be solved (#15029 by @jashan498)

    • Return type of slope and deflection methods for composite beams changed to Add in form of SingularityFunction terms, instead of a Piecewise. (#15052 by @jashan498)

    • added methods to plot shear force, bending moment, slope and deflection. (#14967 by @jashan498)

    • slope and deflection methods now return integral constants along with expression if insufficient boundary conditions to solve those constants are passed. (#14446 by @jashan498)

    • added more Beam examples. (#14453 by @jashan498)

  • physics.mechanics

    • Added a .subs(kindiffdict()) in the forcing full method of kane.py. This is required for the pydy numerical code to work in some cases. This doesn't break any tests. (#15006 by @NikhilPappu)

    • Added a test for the center_of_mass() function in test_functions.py. (#15013 by @NikhilPappu)

    • Added a center of mass function in functions.py which returns the position vector of the center of mass of a system of bodies.

      (#14758 by @NikhilPappu)

    • Added a corner case check in kane.py (Passes dummy symbols to q_ind and kd_eqs if not passed in to prevent errors which shouldn't occur).

      (#14758 by @NikhilPappu)

  • physics.units

    • checking for consistency of terms is no longer done at instantiation (#14923 by @smichr)

    • check_dimensions was added to units/util.py to check expressions for dimensional consistency (#14923 by @smichr)

    • __radd__ and __rmul__ are defined for Dimensions (#14923 by @smichr)

    • quantity_simplify now reduces all Quantities in an Expr with the same Dimension to the same internally canonical Quantity (#14923 by @smichr)

  • physics.vector

  • polys

  • printing

    • Keyword arguments to the dotprint function no longer affect consecutive calls. (#15163 by @asmeurer)

    • Add StrPrinter, print_ccode, print_fcode, print_glsl, print_jscode, print_latex, print_mathml, print_rcode, and pycode to from sympy import *. (#15162 by @asmeurer)

    • fix latex printing of Indexed results #15059 (#15151 by @ayushmankoul)

    • Fixed a bug when latex printing unevaluated pow with 1 as the base (#15060 by @ethankward)

    • The dotprint() function is now included with from sympy import *. (#15096 by @sylee957)

    • replaced **kwargs with explicit variable name (#15080 by @yatna)

    • Improved the latex() function docstring format. (#15040 by @moorepants)

  • simplify

    • fixed a bug in cse which triggered for certain expressions when ignore was also given. (#15003 by @bjodah)
  • solvers

  • stats

    • renamed .integrate( ) to .compute_expectation( ) in sympy.stats in order to avoid confusion with the integrals module. (#15176 by @Upabjojr)

    • Allow calculation of expectation of indexed joint random symbols (#15079 by @akash9712)

    • Add JointRV to allow user to create Joint random variables (#14989 by @akash9712)

    • Add MarginalDistribution, CompoundDistribution (#14989 by @akash9712)

    • Ability to handle compound distributions (#14989 by @akash9712)

  • tensor

  • utilities

    • deprecated source function (#15064 by @yatna)

    • lambdify uses scipy automatically if available (#14992 by @ramvenkat98)

    • fixed a bug with lambdify on curly bracket symbols (#15011 by @bPhysicist)

    • Correctly wrap rationals in lambdify(modules='mpmath'). This prevents nsolve from losing precision when the expression has rationals. (#14976 by @asmeurer)

  • other

    • Added a guide pydy_for_autolev_users.rst in the mechanics part of the documentation. (#15077 by @NikhilPappu)

    • Added the Gotchas section in autolev_parser.rst in the mechanics part of the documentation. (#15066 by @NikhilPappu)

    • Removed .interp and .tokens from parsing/latex. (#15104 by @NikhilPappu)

    • Updated setup.py and Manifest.in for the Autolev and LaTeX parser files. (#15104 by @NikhilPappu)

    • Removed test_antlr_generation() from test_latex.py. (#15104 by @NikhilPappu)

    • Added the issues and future improvements sections to autolev_parser.rst in the mechanics part of the documentation. (#15067 by @NikhilPappu)

    • Added documentation for the Autolev Parser under Mechanics. Added the Introduction and Usage sections. (#15046 by @NikhilPappu)

    • the release notes are now automatically collected from pull request descriptions using a bot. (#14942 by @asmeurer)

Authors

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

Thanks to everyone who contributed to this release!

  • Arif Ahmed
  • Bilal Ahmed*
  • Francesco Bonazzi
  • Raoul Bourquin
  • Ondřej Čertík
  • Ravi charan
  • czgdp1807*
  • Björn Dahlgren
  • Dimas Abreu Archanjo Dutra*
  • eward
  • Isuru Fernando
  • Mauro Garavello
  • Ashish Kumar Gaurav
  • Valeriia Gladkova
  • Thomas Hisch
  • Miro Hrončok*
  • Yathartha Joshi
  • Sudarshan Kamath*
  • Sergey B Kirpichev
  • Ayushman Koul*
  • Leonid Kovalev
  • Amit Kumar
  • S.Y. Lee*
  • Jared Lumpe
  • Colin B. Macdonald
  • Aaron Meurer
  • Jason Moore
  • Sidhant Nagpal
  • Abdullah Javed Nesar
  • Nikhil Pappu
  • Arihant Parsoya
  • ramvenkat98*
  • Avi Shrivastava*
  • Gagandeep Singh
  • Jashanpreet Singh
  • Chris Smith
  • Kalevi Suominen
  • Wes Turner
  • Akash Vaish
  • Yatna Verma*
  • Ethan Ward