Releases: scipy/scipy
SciPy 1.8.0rc1
SciPy 1.8.0 Release Notes
Note: SciPy 1.8.0
is not released yet!
SciPy 1.8.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 DeprecationWarning
s).
Our development attention will now shift to bug-fix releases on the
1.8.x branch, and on adding new features on the master branch.
This release requires Python 3.8
+ and NumPy 1.17.3
or greater.
For running on PyPy, PyPy3 6.0
+ is required.
Highlights of this release
- A sparse array API has been added for early testing and feedback; this
work is ongoing, and users should expect minor API refinements over
the next few releases. - The sparse SVD library PROPACK is now vendored with SciPy, and an interface
is exposed viascipy.sparse.svds
withsolver='PROPACK'
. - A new
scipy.stats.sampling
submodule that leverages theUNU.RAN
C
library to sample from arbitrary univariate non-uniform continuous and
discrete distributions - All namespaces that were private but happened to miss underscores in
their names have been deprecated.
New features
scipy.fft
improvements
Added an orthogonalize=None
parameter to the real transforms in scipy.fft
which controls whether the modified definition of DCT/DST is used without
changing the overall scaling.
scipy.fft
backend registration is now smoother, operating with a single
registration call and no longer requiring a context manager.
scipy.integrate
improvements
scipy.integrate.quad_vec
introduces a new optional keyword-only argument,
args
. args
takes in a tuple of extra arguments if any (default is
args=()
), which is then internally used to pass into the callable function
(needing these extra arguments) which we wish to integrate.
scipy.interpolate
improvements
scipy.interpolate.BSpline
has a new method, design_matrix
, which
constructs a design matrix of b-splines in the sparse CSR format.
A new method from_cubic
in BSpline
class allows to convert a
CubicSpline
object to BSpline
object.
scipy.linalg
improvements
scipy.linalg
gained three new public array structure investigation functions.
scipy.linalg.bandwidth
returns information about the bandedness of an array
and can be used to test for triangular structure discovery, while
scipy.linalg.issymmetric
and scipy.linalg.ishermitian
test the array for
exact and approximate symmetric/Hermitian structure.
scipy.optimize
improvements
scipy.optimize.check_grad
introduces two new optional keyword only arguments,
direction
and seed
. direction
can take values, 'all'
(default),
in which case all the one hot direction vectors will be used for verifying
the input analytical gradient function and 'random'
, in which case a
random direction vector will be used for the same purpose. seed
(default is None
) can be used for reproducing the return value of
check_grad
function. It will be used only when direction='random'
.
The scipy.optimize.minimize
TNC
method has been rewritten to use Cython
bindings. This also fixes an issue with the callback altering the state of the
optimization.
Added optional parameters target_accept_rate
and stepwise_factor
for
adapative step size adjustment in basinhopping
.
The epsilon
argument to approx_fprime
is now optional so that it may
have a default value consistent with most other functions in scipy.optimize
.
scipy.signal
improvements
Add analog
argument, default False
, to zpk2sos
, and add new pairing
option 'minimal'
to construct analog and minimal discrete SOS arrays.
tf2sos
uses zpk2sos; add analog
argument here as well, and pass it on
to zpk2sos
.
savgol_coeffs
and savgol_filter
now work for even window lengths.
Added the Chirp Z-transform and Zoom FFT available as scipy.signal.CZT
and
scipy.signal.ZoomFFT
.
scipy.sparse
improvements
An array API has been added for early testing and feedback; this
work is ongoing, and users should expect minor API refinements over
the next few releases. Please refer to the scipy.sparse
docstring for more information.
maximum_flow
introduces optional keyword only argument, method
which accepts either, 'edmonds-karp'
(Edmonds Karp algorithm) or
'dinic'
(Dinic's algorithm). Moreover, 'dinic'
is used as default
value for method
which means that Dinic's algorithm is used for computing
maximum flow unless specified. See, the comparison between the supported
algorithms in
this comment <https://github.com/scipy/scipy/pull/14358#issue-684212523>
_.
Parameters atol
, btol
now default to 1e-6 in
scipy.sparse.linalg.lsmr
to match with default values in
scipy.sparse.linalg.lsqr
.
Add the Transpose-Free Quasi-Minimal Residual algorithm (TFQMR) for general
nonsingular non-Hermitian linear systems in scipy.sparse.linalg.tfqmr
.
The sparse SVD library PROPACK is now vendored with SciPy, and an interface is
exposed via scipy.sparse.svds
with solver='PROPACK'
. For some problems,
this may be faster and/or more accurate than the default, ARPACK.
sparse.linalg
iterative solvers now have a nonzero initial guess option,
which may be specified as x0 = 'Mb'
.
The trace
method has been added for sparse matrices.
scipy.spatial
improvements
scipy.spatial.transform.Rotation
now supports item assignment and has a new
concatenate
method.
Add scipy.spatial.distance.kulczynski1
in favour of
scipy.spatial.distance.kulsinski
which will be deprecated in the next
release.
scipy.spatial.distance.minkowski
now also supports 0<p<1
.
scipy.special
improvements
The new function scipy.special.log_expit
computes the logarithm of the
logistic sigmoid function. The function is formulated to provide accurate
results for large positive and negative inputs, so it avoids the problems
that would occur in the naive implementation log(expit(x))
.
A suite of five new functions for elliptic integrals:
scipy.special.ellipr{c,d,f,g,j}
. These are the
Carlson symmetric elliptic integrals <https://dlmf.nist.gov/19.16>
_, which
have computational advantages over the classical Legendre integrals. Previous
versions included some elliptic integrals from the Cephes library
(scipy.special.ellip{k,km1,kinc,e,einc}
) but was missing the integral of
third kind (Legendre's Pi), which can be evaluated using the new Carlson
functions. The new Carlson elliptic integral functions can be evaluated in the
complex plane, whereas the Cephes library's functions are only defined for
real inputs.
Several defects in scipy.special.hyp2f1
have been corrected. Approximately
correct values are now returned for z
near exp(+-i*pi/3)
, fixing
#8054 <https://github.com/scipy/scipy/issues/8054>
. Evaluation for such z
is now calculated through a series derived by
López and Temme (2013) <https://arxiv.org/abs/1306.2046>
that converges in
these regions. In addition, degenerate cases with one or more of a
, b
,
and/or c
a non-positive integer are now handled in a manner consistent with
mpmath's hyp2f1 implementation <https://mpmath.org/doc/current/functions/hypergeometric.html>
,
which fixes #7340 <https://github.com/scipy/scipy/issues/7340>
. These fixes
were made as part of an effort to rewrite the Fortran 77 implementation of
hyp2f1 in Cython piece by piece. This rewriting is now roughly 50% complete.
scipy.stats
improvements
scipy.stats.qmc.LatinHypercube
introduces two new optional keyword-only
arguments, optimization
and strength
. optimization
is either
None
or random-cd
. In the latter, random permutations are performed to
improve the centered discrepancy. strength
is either 1 or 2. 1 corresponds
to the classical LHS while 2 has better sub-projection properties. This
construction is referred to as an orthogonal array based LHS of strength 2.
In both cases, the output is still a LHS.
scipy.stats.qmc.Halton
is faster as the underlying Van der Corput sequence
was ported to Cython.
The alternative
parameter was added to the kendalltau
and somersd
functions to allow one-sided hypothesis testing. Similarly, the masked
versions of skewtest
, kurtosistest
, ttest_1samp
, ttest_ind
,
and ttest_rel
now also have an alternative
parameter.
Add scipy.stats.gzscore
to calculate the geometrical z score.
Random variate generators to sample from arbitrary univariate non-uniform
continuous and discrete distributions have been added to the new
scipy.stats.sampling
submodule. Implementations of a C library
UNU.RAN <http://statmath.wu.ac.at/software/unuran/>
_ are used for
performance. The generators added are:
- TransformedDensityRejection
- DiscreteAliasUrn
- NumericalInversePolynomial
- DiscreteGuideTable
- SimpleRatioUniforms
The binned_statistic
set of functions now have improved performance for
the std
, min
, max
, and median
statistic calculations...
SciPy 1.7.3
SciPy 1.7.3 Release Notes
SciPy 1.7.3
is a bug-fix release that provides binary wheels
for MacOS arm64 with Python 3.8
, 3.9
, and 3.10
. The MacOS arm64 wheels
are only available for MacOS version 12.0
and greater, as explained
in Issue 14688.
Authors
- Anirudh Dagar
- Ralf Gommers
- Tyler Reddy
- Pamphile Roy
- Olivier Grisel
- Isuru Fernando
A total of 6 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.
SciPy 1.7.2
SciPy 1.7.2 Release Notes
SciPy 1.7.2
is a bug-fix release with no new features
compared to 1.7.1
. Notably, the release includes wheels
for Python 3.10
, and wheels are now built with a newer
version of OpenBLAS, 0.3.17
. Python 3.10
wheels are provided
for MacOS x86_64 (thin, not universal2 or arm64 at this time),
and Windows/Linux 64-bit. Many wheels are now built with newer
versions of manylinux, which may require newer versions of pip.
Authors
- Peter Bell
- da-woods +
- Isuru Fernando
- Ralf Gommers
- Matt Haberland
- Nicholas McKibben
- Ilhan Polat
- Judah Rand +
- Tyler Reddy
- Pamphile Roy
- Charles Harris
- Matti Picus
- Hugo van Kemenade
- Jacob Vanderplas
A total of 14 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.
SciPy 1.7.1
SciPy 1.7.1 Release Notes
SciPy 1.7.1
is a bug-fix release with no new features
compared to 1.7.0
.
Authors
- Peter Bell
- Evgeni Burovski
- Justin Charlong +
- Ralf Gommers
- Matti Picus
- Tyler Reddy
- Pamphile Roy
- Sebastian Wallkötter
- Arthur Volant
A total of 9 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.
SciPy 1.7.0
SciPy 1.7.0 Release Notes
SciPy 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 DeprecationWarning
s).
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
NumPy and other ecosystem libraries. - We now vendor and leverage the Boost C++ library to enable numerous
improvements for long-standing weaknesses inscipy.stats
scipy.stats
has 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.cdist
andpdist
distance 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,
RBFInterpolator
, was
added to address issues with theRbf
class.
We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source
Software for Science program for supporting many of the improvements to
scipy.stats
.
New features
scipy.cluster
improvements
An optional argument, seed
, has been added to kmeans
and kmeans2
to
set the random generator and random state.
scipy.interpolate
improvements
Improved input validation and error messages for fitpack.bispev
and
fitpack.parder
for scenarios that previously caused substantial confusion
for users.
The class 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
efficiency.
scipy.linalg
improvements
An LAPACK wrapper was added for access to the tgexc
subroutine.
scipy.ndimage
improvements
scipy.ndimage.affine_transform
is now able to infer the output_shape
from
the out
array.
scipy.optimize
improvements
The optional parameter bounds
was added to
_minimize_neldermead
to support bounds constraints
for the Nelder-Mead solver.
trustregion
methods trust-krylov
, dogleg
and trust-ncg
can now
estimate hess
by finite difference using one of
["2-point", "3-point", "cs"]
.
halton
was added as a sampling_method
in scipy.optimize.shgo
.
sobol
was fixed and is now using scipy.stats.qmc.Sobol
.
halton
and sobol
were added as init
methods in
scipy.optimize.differential_evolution.
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.
When linprog
is used with method
'highs'
, 'highs-ipm'
, or
'highs-ds'
, the result object now reports the marginals (AKA shadow
prices, dual values) and residuals associated with each constraint.
scipy.signal
improvements
get_window
supports general_cosine
and general_hamming
window
functions.
scipy.signal.medfilt2d
now releases the GIL where appropriate to enable
performance gains via multithreaded calculations.
scipy.sparse
improvements
Addition of dia_matrix
sparse matrices is now faster.
scipy.spatial
improvements
distance.cdist
and distance.pdist
performance has greatly improved for
certain weighted metrics. Namely: minkowski
, euclidean
, chebyshev
,
canberra
, and cityblock
.
Modest performance improvements for many of the unweighted cdist
and
pdist
metrics noted above.
The parameter seed
was added to scipy.spatial.vq.kmeans
and
scipy.spatial.vq.kmeans2
.
The parameters axis
and keepdims
where added to
scipy.spatial.distance.jensenshannon
.
The rotation
methods from_rotvec
and as_rotvec
now accept a
degrees
argument to specify usage of degrees instead of radians.
scipy.special
improvements
Wright's generalized Bessel function for positive arguments was added as
scipy.special.wright_bessel.
An implementation of the inverse of the Log CDF of the Normal Distribution is
now available via scipy.special.ndtri_exp
.
scipy.stats
improvements
Hypothesis Tests
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
default behavior.
The new function scipy.stats.binomtest
replaces scipy.stats.binom_test
. The
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
scipy.stats.cramervonmises_2samp
.
The Alexander-Govern test is implemented in the new function
scipy.stats.alexandergovern
.
The new functions scipy.stats.barnard_exact
and scipy.stats. boschloo_exact
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
alternatives.
The new function scipy.stats.somersd
performs Somers' D test for ordinal
association between two variables.
An option, permutations
, has been added in scipy.stats.ttest_ind
to
perform permutation t-tests. A trim
option was also added to perform
a trimmed (Yuen's) t-test.
The alternative
parameter was added to the skewtest
, kurtosistest
,
ranksums
, mood
, ansari
, linregress
, and spearmanr
functions
to allow one-sided hypothesis testing.
Sample statistics
The new function scipy.stats.differential_entropy
estimates the differential
entropy of a continuous distribution from a sample.
The boxcox
and 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 skew
and kurtosis
functions achieved
by removal of repeated/redundant calculations.
Substantial performance improvements in scipy.stats.mstats.hdquantiles_sd
.
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.
The parameter nan_policy
was added to scipy.stats.zmap
to provide options
for handling the occurrence of nan
in the input data.
The parameter ddof
was added to scipy.stats.variation
and
scipy.stats.mstats.variation
.
The parameter weights
was added to scipy.stats.gmean
.
Statistical Distributions
We now vendor and leverage the Boost C++ library to address a number of
previously reported issues in stats
. Notably, beta
, binom
,
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
scipy.stats.skewcauchy
.
The Zipfian probability distribution has been implemented as
scipy.stats.zipfian
.
The new distributions nchypergeom_fisher
and nchypergeom_wallenius
implement the Fisher and Wallenius versions of the noncentral hypergeometric
distribution, respectively.
The generalized hyperbolic distribution was added in
scipy.stats.genhyperbolic
.
The studentized range distribution was added in scipy.stats.studentized_range
.
scipy.stats.argus
now has improved handling for small parameter values.
Better argument handling/preparation has resulted in performance improvements
for many distributions.
The cosine
distribution has added ufuncs for ppf
, cdf
, sf
, and
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.
Other
scipy.stats.bootstrap
has been added to allow estimation of the confidence
interval and standard error of a statistic.
The new function `scipy.stat...
SciPy 1.7.0rc2
SciPy 1.7.0 Release Notes
Note: Scipy 1.7.0 is not released yet!
SciPy 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 DeprecationWarning
s).
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 inscipy.stats
scipy.stats
has 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.cdist
andpdist
distance 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,
RBFInterpolator
, was
added to address issues with theRbf
class.
We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source
Software for Science program for supporting many of the improvements to
scipy.stats
.
New features
scipy.cluster
improvements
An optional argument, seed
, has been added to kmeans
and kmeans2
to
set the random generator and random state.
scipy.interpolate
improvements
Improved input validation and error messages for fitpack.bispev
and
fitpack.parder
for scenarios that previously caused substantial confusion
for users.
The class 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
efficiency.
scipy.linalg
improvements
An LAPACK wrapper was added for access to the tgexc
subroutine.
scipy.ndimage
improvements
scipy.ndimage.affine_transform
is now able to infer the output_shape
from
the out
array.
scipy.optimize
improvements
The optional parameter bounds
was added to
_minimize_neldermead
to support bounds constraints
for the Nelder-Mead solver.
trustregion
methods trust-krylov
, dogleg
and trust-ncg
can now
estimate hess
by finite difference using one of
["2-point", "3-point", "cs"]
.
halton
was added as a sampling_method
in scipy.optimize.shgo
.
sobol
was fixed and is now using scipy.stats.qmc.Sobol
.
halton
and sobol
were added as init
methods in
scipy.optimize.differential_evolution.
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.
When linprog
is used with method
'highs'
, 'highs-ipm'
, or
'highs-ds'
, the result object now reports the marginals (AKA shadow
prices, dual values) and residuals associated with each constraint.
scipy.signal
improvements
get_window
supports general_cosine
and general_hamming
window
functions.
scipy.signal.medfilt2d
now releases the GIL where appropriate to enable
performance gains via multithreaded calculations.
scipy.sparse
improvements
Addition of dia_matrix
sparse matrices is now faster.
scipy.spatial
improvements
distance.cdist
and distance.pdist
performance has greatly improved for
certain weighted metrics. Namely: minkowski
, euclidean
, chebyshev
,
canberra
, and cityblock
.
Modest performance improvements for many of the unweighted cdist
and
pdist
metrics noted above.
The parameter seed
was added to scipy.spatial.vq.kmeans
and
scipy.spatial.vq.kmeans2
.
The parameters axis
and keepdims
where added to
scipy.spatial.distance.jensenshannon
.
The rotation
methods from_rotvec
and as_rotvec
now accept a
degrees
argument to specify usage of degrees instead of radians.
scipy.special
improvements
Wright's generalized Bessel function for positive arguments was added as
scipy.special.wright_bessel.
An implementation of the inverse of the Log CDF of the Normal Distribution is
now available via scipy.special.ndtri_exp
.
scipy.stats
improvements
Hypothesis Tests
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
default behavior.
The new function scipy.stats.binomtest
replaces scipy.stats.binom_test
. The
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
scipy.stats.cramervonmises_2samp
.
The Alexander-Govern test is implemented in the new function
scipy.stats.alexandergovern
.
The new functions scipy.stats.barnard_exact
and scipy.stats. boschloo_exact
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
alternatives.
The new function scipy.stats.somersd
performs Somers' D test for ordinal
association between two variables.
An option, permutations
, has been added in scipy.stats.ttest_ind
to
perform permutation t-tests. A trim
option was also added to perform
a trimmed (Yuen's) t-test.
The alternative
parameter was added to the skewtest
, kurtosistest
,
ranksums
, mood
, ansari
, linregress
, and spearmanr
functions
to allow one-sided hypothesis testing.
Sample statistics
The new function scipy.stats.differential_entropy
estimates the differential
entropy of a continuous distribution from a sample.
The boxcox
and 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 skew
and kurtosis
functions achieved
by removal of repeated/redundant calculations.
Substantial performance improvements in scipy.stats.mstats.hdquantiles_sd
.
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.
The parameter nan_policy
was added to scipy.stats.zmap
to provide options
for handling the occurrence of nan
in the input data.
The parameter ddof
was added to scipy.stats.variation
and
scipy.stats.mstats.variation
.
The parameter weights
was added to scipy.stats.gmean
.
Statistical Distributions
We now vendor and leverage the Boost C++ library to address a number of
previously reported issues in stats
. Notably, beta
, binom
,
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
scipy.stats.skewcauchy
.
The Zipfian probability distribution has been implemented as
scipy.stats.zipfian
.
The new distributions nchypergeom_fisher
and nchypergeom_wallenius
implement the Fisher and Wallenius versions of the noncentral hypergeometric
distribution, respectively.
The generalized hyperbolic distribution was added in
scipy.stats.genhyperbolic
.
The studentized range distribution was added in scipy.stats.studentized_range
.
scipy.stats.argus
now has improved handling for small parameter values.
Better argument handling/preparation has resulted in performance improvements
for many distributions.
The cosine
distribution has added ufuncs for ppf
, cdf
, sf
, and
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.
Other
scipy.stats.bootstrap
has been added to allow estimation of the confidence
interval and standard error of a...
SciPy 1.7.0rc1
SciPy 1.7.0 Release Notes
Note: Scipy 1.7.0
is not released yet!
SciPy 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 DeprecationWarning
s).
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 inscipy.stats
scipy.stats
has 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.cdist
andpdist
distance 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,
RBFInterpolator
, was
added to address issues with theRbf
class.
We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source
Software for Science program for supporting many of the improvements to
scipy.stats
.
New features
scipy.cluster
improvements
An optional argument, seed
, has been added to kmeans
and kmeans2
to
set the random generator and random state.
scipy.interpolate
improvements
Improved input validation and error messages for fitpack.bispev
and
fitpack.parder
for scenarios that previously caused substantial confusion
for users.
The class 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
efficiency.
scipy.linalg
improvements
An LAPACK wrapper was added for access to the tgexc
subroutine.
scipy.ndimage
improvements
scipy.ndimage.affine_transform
is now able to infer the output_shape
from
the out
array.
scipy.optimize
improvements
The optional parameter bounds
was added to
_minimize_neldermead
to support bounds constraints
for the Nelder-Mead solver.
trustregion
methods trust-krylov
, dogleg
and trust-ncg
can now
estimate hess
by finite difference using one of
["2-point", "3-point", "cs"]
.
halton
was added as a sampling_method
in scipy.optimize.shgo
.
sobol
was fixed and is now using scipy.stats.qmc.Sobol
.
halton
and sobol
were added as init
methods in
scipy.optimize.differential_evolution.
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.
When linprog
is used with method
'highs'
, 'highs-ipm'
, or
'highs-ds'
, the result object now reports the marginals (AKA shadow
prices, dual values) and residuals associated with each constraint.
scipy.signal
improvements
get_window
supports general_cosine
and general_hamming
window
functions.
scipy.signal.medfilt2d
now releases the GIL where appropriate to enable
performance gains via multithreaded calculations.
scipy.sparse
improvements
Addition of dia_matrix
sparse matrices is now faster.
scipy.spatial
improvements
distance.cdist
and distance.pdist
performance has greatly improved for
certain weighted metrics. Namely: minkowski
, euclidean
, chebyshev
,
canberra
, and cityblock
.
Modest performance improvements for many of the unweighted cdist
and
pdist
metrics noted above.
The parameter seed
was added to scipy.spatial.vq.kmeans
and
scipy.spatial.vq.kmeans2
.
The parameters axis
and keepdims
where added to
scipy.spatial.distance.jensenshannon
.
The rotation
methods from_rotvec
and as_rotvec
now accept a
degrees
argument to specify usage of degrees instead of radians.
scipy.special
improvements
Wright's generalized Bessel function for positive arguments was added as
scipy.special.wright_bessel.
An implementation of the inverse of the Log CDF of the Normal Distribution is
now available via scipy.special.ndtri_exp
.
scipy.stats
improvements
Hypothesis Tests
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
default behavior.
The new function scipy.stats.binomtest
replaces scipy.stats.binom_test
. The
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
scipy.stats.cramervonmises_2samp
.
The Alexander-Govern test is implemented in the new function
scipy.stats.alexandergovern
.
The new functions scipy.stats.barnard_exact
and scipy.stats. boschloo_exact
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
alternatives.
The new function scipy.stats.somersd
performs Somers' D test for ordinal
association between two variables.
An option, permutations
, has been added in scipy.stats.ttest_ind
to
perform permutation t-tests. A trim
option was also added to perform
a trimmed (Yuen's) t-test.
The alternative
parameter was added to the skewtest
, kurtosistest
,
ranksums
, mood
, ansari
, linregress
, and spearmanr
functions
to allow one-sided hypothesis testing.
Sample statistics
The new function scipy.stats.differential_entropy
estimates the differential
entropy of a continuous distribution from a sample.
The boxcox
and 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 skew
and kurtosis
functions achieved
by removal of repeated/redundant calculations.
Substantial performance improvements in scipy.stats.mstats.hdquantiles_sd
.
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.
The parameter nan_policy
was added to scipy.stats.zmap
to provide options
for handling the occurrence of nan
in the input data.
The parameter ddof
was added to scipy.stats.variation
and
scipy.stats.mstats.variation
.
The parameter weights
was added to scipy.stats.gmean
.
Statistical Distributions
We now vendor and leverage the Boost C++ library to address a number of
previously reported issues in stats
. Notably, beta
, binom
,
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
scipy.stats.skewcauchy
.
The Zipfian probability distribution has been implemented as
scipy.stats.zipfian
.
The new distributions nchypergeom_fisher
and nchypergeom_wallenius
implement the Fisher and Wallenius versions of the noncentral hypergeometric
distribution, respectively.
The generalized hyperbolic distribution was added in
scipy.stats.genhyperbolic
.
The studentized range distribution was added in scipy.stats.studentized_range
.
scipy.stats.argus
now has improved handling for small parameter values.
Better argument handling/preparation has resulted in performance improvements
for many distributions.
The cosine
distribution has added ufuncs for ppf
, cdf
, sf
, and
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.
Other
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
distribution.
New ...
SciPy 1.6.3
SciPy 1.6.3 Release Notes
SciPy 1.6.3
is a bug-fix release with no new features
compared to 1.6.2
.
Authors
- Peter Bell
- Ralf Gommers
- Matt Haberland
- Peter Mahler Larsen
- Tirth Patel
- Tyler Reddy
- Pamphile ROY +
- Xingyu Liu +
A total of 8 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.
SciPy 1.6.2
SciPy 1.6.2 Release Notes
SciPy 1.6.2
is a bug-fix release with no new features
compared to 1.6.1
. This is also the first SciPy release
to place upper bounds on some dependencies to improve
the long-term repeatability of source builds.
Authors
- Pradipta Ghosh +
- Tyler Reddy
- Ralf Gommers
- Martin K. Scherer +
- Robert Uhl
- Warren Weckesser
A total of 6 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.
SciPy 1.6.1
SciPy 1.6.1 Release Notes
SciPy 1.6.1
is a bug-fix release with no new features
compared to 1.6.0
.
Please note that for SciPy wheels to correctly install with pip on
macOS 11, pip >= 20.3.3
is needed.
Authors
- Peter Bell
- Evgeni Burovski
- CJ Carey
- Ralf Gommers
- Peter Mahler Larsen
- Cheng H. Lee +
- Cong Ma
- Nicholas McKibben
- Nikola Forró
- Tyler Reddy
- Warren Weckesser
A total of 11 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.