SciPy 1.7.0 Release Notes
1.7.0 is not released yet!
1.7.0 is the culmination of 6 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with
python -Wd and check for
Our development attention will now shift to bug-fix releases on the
1.7.x branch, and on adding new features on the master branch.
This release requires Python
3.7+ and NumPy
1.16.5 or greater.
For running on PyPy, PyPy3
6.0+ is required.
Highlights of this release
- A new submodule for quasi-Monte Carlo,
scipy.stats.qmc, was added
- The documentation design was updated to use the same PyData-Sphinx theme as
other NumFOCUS packages like NumPy.
- We now vendor and leverage the Boost C++ library to enable numerous
improvements for long-standing weaknesses in
scipy.statshas six new distributions, eight new (or overhauled)
hypothesis tests, a new function for bootstrapping, a class that enables
fast random variate sampling and percentile point function evaluation,
and many other enhancements.
pdistdistance calculations are faster for several metrics,
especially weighted cases, thanks to a rewrite to a new C++ backend framework
- A new class for radial basis function interpolation,
added to address issues with the
We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source
Software for Science program for supporting many of the improvements to
An optional argument,
seed, has been added to
set the random generator and random state.
Improved input validation and error messages for
fitpack.parder for scenarios that previously caused substantial confusion
RBFInterpolator was added to supersede the
Rbf class. The new
class has usage that more closely follows other interpolator classes, corrects
sign errors that caused unexpected smoothing behavior, includes polynomial
terms in the interpolant (which are necessary for some RBF choices), and
supports interpolation using only the k-nearest neighbors for memory
An LAPACK wrapper was added for access to the
scipy.ndimage.affine_transform is now able to infer the
The optional parameter
bounds was added to
_minimize_neldermead to support bounds constraints
for the Nelder-Mead solver.
trust-ncg can now
hess by finite difference using one of
["2-point", "3-point", "cs"].
halton was added as a
sobol was fixed and is now using
sobol were added as
init methods in
differential_evolution now accepts an
x0 parameter to provide an
initial guess for the minimization.
least_squares has a modest performance improvement when SciPy is built
with Pythran transpiler enabled.
linprog is used with
'highs-ds', the result object now reports the marginals (AKA shadow
prices, dual values) and residuals associated with each constraint.
scipy.signal.medfilt2d now releases the GIL where appropriate to enable
performance gains via multithreaded calculations.
dia_matrix sparse matrices is now faster.
distance.pdist performance has greatly improved for
certain weighted metrics. Namely:
Modest performance improvements for many of the unweighted
pdist metrics noted above.
seed was added to
keepdims where added to
as_rotvec now accept a
degrees argument to specify usage of degrees instead of radians.
Wright's generalized Bessel function for positive arguments was added as
An implementation of the inverse of the Log CDF of the Normal Distribution is
now available via
The Mann-Whitney-Wilcoxon test,
mannwhitneyu, has been rewritten. It now
supports n-dimensional input, an exact test method when there are no ties,
and improved documentation. Please see "Other changes" for adjustments to
The new function
new function returns an object that calculates a confidence intervals of the
proportion parameter. Also, performance was improved from O(n) to O(log(n)) by
using binary search.
The two-sample version of the Cramer-von Mises test is implemented in
The Alexander-Govern test is implemented in the new function
The new functions
respectively perform Barnard's exact test and Boschloo's exact test
for 2x2 contingency tables.
The new function
scipy.stats.page_trend_test performs Page's test for ordered
The new function
scipy.stats.somersd performs Somers' D test for ordinal
association between two variables.
permutations, has been added in
perform permutation t-tests. A
trim option was also added to perform
a trimmed (Yuen's) t-test.
alternative parameter was added to the
to allow one-sided hypothesis testing.
The new function
scipy.stats.differential_entropy estimates the differential
entropy of a continuous distribution from a sample.
boxcox_normmax now allow the user to control the
optimizer used to minimize the negative log-likelihood function.
A new function
scipy.stats.contingency.relative_risk calculates the
relative risk, or risk ratio, of a 2x2 contingency table. The object
returned has a method to compute the confidence interval of the relative risk.
Performance improvements in the
kurtosis functions achieved
by removal of repeated/redundant calculations.
Substantial performance improvements in
The new function
scipy.stats.contingency.association computes several
measures of association for a contingency table: Pearsons contingency
coefficient, Cramer's V, and Tschuprow's T.
nan_policy was added to
scipy.stats.zmap to provide options
for handling the occurrence of
nan in the input data.
ddof was added to
weights was added to
We now vendor and leverage the Boost C++ library to address a number of
previously reported issues in
nbinom now have Boost backends, and it is straightforward to leverage
the backend for additional functions.
The skew Cauchy probability distribution has been implemented as
The Zipfian probability distribution has been implemented as
The new distributions
implement the Fisher and Wallenius versions of the noncentral hypergeometric
The generalized hyperbolic distribution was added in
The studentized range distribution was added in
scipy.stats.argus now has improved handling for small parameter values.
Better argument handling/preparation has resulted in performance improvements
for many distributions.
cosine distribution has added ufuncs for
isf methods including numerical precision improvements at the edges of the
support of the distribution.
An option to fit the distribution to data by the method of moments has been
added to the
fit method of the univariate continuous distributions.
scipy.stats.bootstrap has been added to allow estimation of the confidence
interval and standard error of a statistic.
The new function
scipy.stats.contingency.crosstab computes a contingency
table (i.e. a table of counts of unique entries) for the given data.
scipy.stats.NumericalInverseHermite enables fast random variate sampling
and percentile point function evaluation of an arbitrary univariate statistical
This new module provides Quasi-Monte Carlo (QMC) generators and associated
It provides a generic class
scipy.stats.qmc.QMCEngine which defines a QMC
engine/sampler. An engine is state aware: it can be continued, advanced and
reset. 3 base samplers are available:
scipy.stats.qmc.Sobolthe well known Sobol low discrepancy sequence.
Several warnings have been added to guide the user into properly using this
sampler. The sequence is scrambled by default.
scipy.stats.qmc.Halton: Halton low discrepancy sequence. The sequence is
scrambled by default.
scipy.stats.qmc.LatinHypercube: plain LHS design.
And 2 special samplers are available:
scipy.stats.qmc.MultinomialQMC: sampling from a multinomial distribution
using any of the base
scipy.stats.qmc.MultivariateNormalQMC: sampling from a multivariate Normal
using any of the base
The module also provide the following helpers:
scipy.stats.qmc.discrepancy: assess the quality of a set of points in terms
of space coverage.
scipy.stats.qmc.update_discrepancy: can be used in an optimization loop to
construct a good set of points.
scipy.stats.qmc.scale: easily scale a set of points from (to) the unit
interval to (from) a given range.
scipy.linalg.pinv2is deprecated and its functionality is completely
scipy.linalg.pinvhwere not working and now are deprecated. They are now
replaced with functioning
rtolkeywords with clear usage.
scipy.spatial.distancemetrics expect 1d input vectors but will call
np.squeezeon their inputs to accept any extra length-1 dimensions. That
behaviour is now deprecated.
Backwards incompatible changes
We now accept and leverage performance improvements from the ahead-of-time
Python-to-C++ transpiler, Pythran, which can be optionally disabled (via
export SCIPY_USE_PYTHRAN=0) but is enabled by default at build time.
There are two changes to the default behavior of
- For years, use of the default
alternative=Nonewas deprecated; explicit
alternativespecification was required. Use of the new default value of
alternative, "two-sided", is now permitted.
- Previously, all p-values were based on an asymptotic approximation. Now, for
small samples without ties, the p-values returned are exact by default.
Support has been added for PEP 621 (project metadata in
We now support a Gitpod environment to reduce the barrier to entry for SciPy
development; for more details see
- Jelle Aalbers +
- Adam +
- Tania Allard +
- Sven Baars +
- Max Balandat +
- baumgarc +
- Christoph Baumgarten
- Peter Bell
- Lilian Besson
- Robinson Besson +
- Max Bolingbroke
- Blair Bonnett +
- Jordão Bragantini
- Harm Buisman +
- Evgeni Burovski
- Matthias Bussonnier
- Dominic C
- CJ Carey
- Ramón Casero +
- Chachay +
- charlotte12l +
- Benjamin Curtice Corbett +
- Falcon Dai +
- Ian Dall +
- Terry Davis
- droussea2001 +
- DWesl +
- dwight200 +
- Thomas J. Fan +
- Joseph Fox-Rabinovitz
- Max Frei +
- Laura Gutierrez Funderburk +
- gbonomib +
- Matthias Geier +
- Pradipta Ghosh +
- Ralf Gommers
- Evan H +
- Matt Haberland
- Anselm Hahn +
- Alex Henrie
- Piet Hessenius +
- Trever Hines +
- Elisha Hollander +
- Stephan Hoyer
- Tom Hu +
- Kei Ishikawa +
- Julien Jerphanion
- Robert Kern
- Shashank KS +
- Peter Mahler Larsen
- Eric Larson
- Cheng H. Lee +
- Gregory R. Lee
- Jean-Benoist Leger +
- lgfunderburk +
- liam-o-marsh +
- Xingyu Liu +
- Alex Loftus +
- Christian Lorentzen +
- Cong Ma
- Marc +
- MarkPundurs +
- Markus Löning +
- Liam Marsh +
- Nicholas McKibben
- melissawm +
- Jamie Morton
- Andrew Nelson
- Nikola Forró
- Tor Nordam +
- Olivier Gauthé +
- Rohit Pandey +
- Avanindra Kumar Pandeya +
- Tirth Patel
- paugier +
- Alex H. Wagner, PhD +
- Jeff Plourde +
- Ilhan Polat
- pranavrajpal +
- Vladyslav Rachek
- Bharat Raghunathan
- Recursing +
- Tyler Reddy
- Lucas Roberts
- Gregor Robinson +
- Pamphile Roy +
- Atsushi Sakai
- Benjamin Santos
- Martin K. Scherer +
- Thomas Schmelzer +
- Daniel Scott +
- Sebastian Wallkötter +
- serge-sans-paille +
- Namami Shanker +
- Masashi Shibata +
- Alexandre de Siqueira +
- Albert Steppi +
- Adam J. Stewart +
- Kai Striega
- Diana Sukhoverkhova
- Søren Fuglede Jørgensen
- Mike Taves
- Dan Temkin +
- Nicolas Tessore +
- tsubota20 +
- Robert Uhl
- christos val +
- Bas van Beek +
- Ashutosh Varma +
- Jose Vazquez +
- Sebastiano Vigna
- Aditya Vijaykumar
- Arthur Volant +
- Samuel Wallan
- Stefan van der Walt
- Warren Weckesser
- Anreas Weh
- Josh Wilson
- Rory Yorke
- Egor Zemlyanoy
- Marc Zoeller +
- zoj613 +
- 秋纫 +
A total of 126 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
This list of names is automatically generated, and may not be fully complete.