Release Notes for 0.7.6 - gxyd/sympy GitHub Wiki
These are the release notes for SymPy 0.7.6. You can download it from here.
This version of SymPy has been tested on Python 2.6, 2.7, 3.2, 3.3, 3.4, and PyPy.
Major changes
-
New module
calculus.finite_diff
for generating finite difference formulae approximating derivatives of arbitrary order on arbitrarily spaced grids. -
New module
physics.optics
for symbolic computations related to optics. -
geometry
module now supports 3D geometry. -
Support for series expansions at a point other then 0 or oo. See PR #2427.
-
Rules for the intersection of integer ImageSets were added. See PR #7587. We can now do things like
{2⋅m | m ∊ ℤ} ∩ {3⋅n | n ∊ ℤ} = {6⋅t | t ∊ ℤ}
and{2⋅m | m ∊ ℤ} ∩ {2⋅n + 1 | n ∊ ℤ} = ∅
-
dsolve
module now supports system of ODEs including linear system of ODEs of 1st order for 2 and 3 equations and of 2nd order for 2 equations. It also supports homogeneous linear system ofn
equations. -
New support for continued fractions, including iterators for partial quotients and convergents, and reducing a continued fraction to a Rational or a quadratic irrational.
-
Support for Egyptian fraction expansions, using several different algorithms.
-
Addition of generalized linearization methods to
physics.mechanics
. -
Use an LRU cache by default instead of an unbounded one. See PR [#7464] (https://github.com/sympy/sympy/pull/7464). Control cache size by the environment variable
SYMPY_CACHE_SIZE
(default is 500).SYMPY_CACHE_SIZE=None
restores the unbounded cache. -
Added
fastcache
as an optional dependency. Requires v0.4 or newer. Control viaSYMPY_CACHE_SIZE
. May result in significant speedup. See PR [#7737] (https://github.com/sympy/sympy/pull/7737). -
New experimental module
physics.unitsystems
for computation with dimensions, units and quantities gathered into systems. This opens the way to dimensional analysis and better quantity calculus. The old modulephysics.units
will stay available until the new one reaches a mature state. See PR #2628. -
New
Complement
class to represent relative complements of two sets. See Pr #7462. -
New trigonometric functions (asec, acsc), many enhancements for other trigonometric functions (PR #7500).
-
New
Contains
class to represent the relation "is an element of" (see PR #7989). -
The code generation tools (code printers,
codegen
,autowrap
, andufuncify
) have been updated to support a wider variety of constructs, and do so in a more robust way. Major changes include added support for matrices as inputs/outputs, and more robust handling of conditional (Piecewise
) statements. -
ufuncify
now uses a backend that generates actualnumpy.ufuncs
by default through the use of thenumpy
C api. This allows broadcasting on all arguments. The previouscython
andf2py
backends are still accessible through the use of thebackend
kwarg. -
CodeGen
now generates code for Octave and Matlab from SymPy expressions. This is supported by a new CodePrinter with interfaceoctave_code
. For exampleoctave_code(Matrix([x**2, sin(pi*x*y), ceiling(x)](/gxyd/sympy/wiki/x**2,-sin(pi*x*y),-ceiling(x))))
gives the string[x.^2 sin(pi*x.*y) ceil(x)]
. -
New general 3D vector package at
sympy.vector
. This package provides a 3D vector object with the Del, gradient, divergence, curl, and operators. It supports arbitrary rotations of Cartesian coordinate systems and arbitrary locations of points.
Backwards compatibility breaks and deprecations
-
All usage of inequalities (
>
,>=
,<
,<=
) on SymPy objects will now return SymPy'sS.true
orS.false
singletons instead of Python'sTrue
orFalse
singletons. Code that checks for, e.g.,(a < b) is True
should be changed to(a < b) == True
or(a < b) == S.true
. Use ofis
is not recommended here. -
The
subset()
method insympy.core.sets
is marked as being deprecated and will be removed in a future release (issue). Instead, theis_subset()
method should be used. -
Previously, if you compute the series expansion at a point other than 0, the result was shifted to 0. Now SymPy returns the usual series expansion, see PR #2427.
-
In
physics.mechanics
,KanesMethod.linearize
has a new interface. Old code should be changed to use this instead. See docstring for information. -
physics.gaussopt
has been moved tophysics.optics.gaussopt
. You can still import it from the previous location but it may result in a deprecation warning. -
This is the last release with the bundled mpmath library. In the next release you will have to install this library from the official site.
-
Previously
lambdify
would convertMatrix
tonumpy.matrix
by default. This behavior is being deprecated, and will be completely phased out with the release of 0.7.7. To use the new behavior now set the modules kwarg to[{'ImmutableMatrix': numpy.array}, 'numpy']
. If lambdify will be used frequently it is recommended to wrap it with apartial
as so:lambdify = functools.partial(lambdify, modules=[{'ImmutableMatrix': numpy.array}, 'numpy'])
. For more information see #7853 and thelambdify
doc string. -
Set.complement
doesn't exists as an attribute anymore. Now we have a methodSet.complement(<universal_set>)
which complements the given universal set. -
Removed is_finite assumption (see #7891). Use instead a combination of "is_bounded and is_nonzero" assumptions.
-
is_bounded and is_unbounded assumptions were renamed to is_finite and is_infinite (see #7947).
-
Removed is_infinitesimal assumption (see #7995).
-
Removed is_real property for Sets, use set.is_subset(Reals) instead (see #7996).
-
For generic symbol
x
(SymPy's symbols are not bounded by default), inequalities withoo
are no longer evaluated as they were before, e.g.x < oo
no longer evaluates to True). See #7861. -
CodeGen
has been refactored to make it easier to add other languages. The main high-level tool is stillutilities.codegen.codegen
. But if you previously used theRoutine
class directly, note its__init__
behaviour has changed; the newutilities.codegen.make_routine
is recommended instead and by default retains the previous C/Fortran behaviour. If needed, you can still instantiateRoutine
directly; it only does minimal sanity checking on its inputs. See #8082. -
FiniteSet([1, 2, 3, 4])
syntax not supported anymore, useFiniteSet(1, 2, 3, 4)
instead See #7622.
Minor changes
- Updated the parsing module to allow sympification of lambda statements to their SymPy equivalent.
- Lambdify can now use
numexpr
by specifyingmodules='numexpr'
- Use
with evaluate(False)
context manager to control automatic evaluation. E.g.with evaluate(False): x + x
is actuallyx + x
, not2*x
- IndexedBase and Indexed are changed to be commutative by default
sympy.core.sets
moved tosympy.sets
- Changes in
sympy.sets
:- Infinite
Range
is now allowed. See PR #7741 is_subset()
: Theis_subset()
method deprecates thesubset()
method.self.is_subset(other)
checks ifself
is a subset ofother
. This is different fromself.subset(other)
, which checked ifother
is a subset ofself
.is_superset()
: A new methodis_superset()
method is now available.self.is_superset(other)
checks ifself
is a superset ofother
.is_proper_subset
andis_proper_superset
: Two new methods allow checking if one set is the proper subset and proper superset of another respectively. For eg.self.is_proper_subset(other)
andself.is_proper_superset(other)
checks ifself
is the proper subset ofother
and ifself
is the proper superset ofother
respectively.is_disjoint()
: A new method for checking if two sets are disjoint.powerset()
: A new methodpowerset()
has been added to find the power set of a set.- The cardinality of a
ProductSet
can be found using thelen()
function.
- Infinite
- Changes in
sympy.plot.plot_implicit
:- The
plot_implicit
function now also allows explicitly specifying the symbols to plot on the X and Y axes. If not specified, the symbols will be assigned in the order they are sorted. - The
plot_implicit
function also allows axes labels for the plot to be specified.
- The
- rules for simplification of ImageSet were added PR#7625. As a result
{x | x ∊ ℤ}
now simplifies toℤ
and{sin(n) | n ∊ {tan(m) | m ∊ ℤ}}
automatically simplifies to{sin(tan(m)) | m ∊ ℤ}
- coth(0) now returns Complex Infinity. See #7634
- dioptre is added to
physics.units
#7782 replace
now respects commutativity #7752- The CCodePrinter gracefully handles Symbols which have string representations that match C reserved words. #8199
limit
function now returns an unevaluated Limit instance if it can't compute given limit, see #8213
Authors
The following people contributed at least one patch to this release (names are given in alphabetical order by last name). A total of 92 people contributed to this release. People with a * by their names contributed a patch for the first time for this release; 62 people contributed for the first time for this release.
Thanks to everyone who contributed to this release!
- Rajat Aggarwal*
- Alkiviadis G. Akritas
- Akshay
- Fawaz Alazemi*
- Faisal Anees*
- Kunal Arora*
- Maciej Baranski*
- Sambuddha Basu*
- Ralph Bean*
- Soumya Dipta Biswas*
- Leonid Blouvshtein*
- Francesco Bonazzi
- Raoul Bourquin
- Peter Brady*
- carstimon*
- Ondřej Čertík
- Sarwar Chahal*
- Abhinav Chanda*
- John Connor*
- Jim Crist*
- Björn Dahlgren
- Avichal Dayal
- Hamish Dickson*
- Comer Duncan
- Harold Erbin
- Lennart Fricke*
- Michael Gallaspy*
- Henry Gebhardt*
- Brian E. Granger
- Benjamin Gudehus*
- Harsh Gupta
- Pierre Haessig*
- Venkatesh Halli*
- Randy Heydon
- Sushant Hiray*
- Thomas Hisch
- immerrr*
- Roman Inflianskas*
- Mihai A. Ionescu*
- Saurabh Jha
- Sachin Joglekar
- Robert Johansson*
- Stas Kelvich*
- Sergey B Kirpichev
- Stefan Krastanov
- Kundan Kumar*
- David Li
- Ben Lucato*
- ck Lux*
- Colin B. Macdonald*
- Ambar Mehrotra*
- Aaron Meurer
- Peleg Michaeli*
- Sudhanshu Mishra*
- Jason Moore
- Marcus Näslund*
- Zamrath Nizam*
- Clemens Novak*
- Duane Nykamp*
- Dhruvesh Vijay Parikh*
- Mario Pernici
- Patrick Poitras
- Raj*
- Thilina Rathnayake
- Timothy Reluga
- richierichrawr*
- Julien Rioux
- Matthew Rocklin
- Juan Luis Cano Rodríguez*
- Rajath S
- Amit Saha
- Dammina Sahabandu*
- David P. Sanders*
- Vlad Seghete*
- Mridul Seth*
- sevaader*
- Zeel Shah*
- Aditya Shah*
- Anurag Sharma*
- shashank-agg*
- Sahil Shekhawat*
- Mark Shoulson*
- Shukla*
- John V. Siratt*
- Chris Smith
- Craig A. Stoudt*
- Kalevi Suominen*
- Kaushik Varanasi*
- Sean Vig
- Nathan Woods*
- Chai Wah Wu*
- zsc347*