NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #97 most downloaded on PyPI
Fundamental algorithms for scientific computing in Python
Last release 1 months ago
21 Aug 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 55 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
16 years old
108 releases · first in 2010
SciPy 1.18.1 is a bug-fix release with no new features compared to 1.18.0 . This release includes binaries on PyPI for Python 3.15 , and the minimum r
SciPy 1.18.1 is a bug-fix release with no new features
compared to 1.18.0. This release includes binaries on
PyPI for Python 3.15, and the minimum required version
of the GCC toolchain has been increased to 10.3.0.
A total of 18 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.
Note that the source and binary assets associated with this release were published to PyPI using trusted publishing, and so the trusted assets and their hashes are made available more securely at https://pypi.org/project/scipy/1.18.1/ rather than providing them here in a less secure manner.
A complete list of issues and pull requests associated with this release is available in the associated README.txt.
One column per quarter.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
SciPy 1.18.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.18.x branch, and on adding new features on the main branch.
This release requires Python 3.12-3.14 and NumPy 2.0.0 or greater.
cython_lapack
consumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
has been substantially improved across the SciPy library.scipy.signal.whittaker_henderson now provides access to Whittaker-Henderson
smoothing of a discrete signal.scipy.stats functions now support lazy arrays and JAX
JIT. Array API support has been improved substantially in SciPy, with at least
21 functions gaining new support in this release. 16 scipy.stats functions
have also gained support for MArray input.scipy.fft improvementspocketfft to its
successor package ducc0.fft, which features several incremental
improvements. The most significant of those from SciPy's perspective is
probably that storage requirements for internally cached plans have been
significantly reduced for most long 1D transforms. Plans that require more
storage than 1MB will no longer be cached; this mainly affects huge 1D
transforms of prime and near-prime sizes.scipy.interpolate improvementssimplex_tolerance argument to the _call__ methods of
LinearNDInterpolator and CloughTocher2dInterpolator. This can
help users avoid holes in certain interpolation problems.scipy.differentiate improvementsscipy.differentiate.derivative now supports passing kwargs to the
function whose derivative is desired.scipy.linalg improvementscython_blas/cython_lapack/
linalg.blas/linalg.lapack (support for Accelerate and MKL).cython_lapack users to gracefully
handle LP64/ILP64 backend builds. Worked examples, including build system
details, have been included in this release.overwrite_b keyword argument was added to eigvals, for consistency
with other similar linalg functions.linalg.cholesky now leverages symmetry properties for performance
improvements, especially for real matrices. The batching loop of cholesky
has now also been moved to a C implementation.scipy.linalg.lu and scipy.linalg.det have been rewritten in C++ with
batching support in the compiled code.scipy.linalg.expm and scipy.linalg.sqrtm.scipy.linalg.qr, scipy.linalg.eig,
scipy.linalg.lstsq, and scipy.linalg.svd have been moved to C,
providing a substantial speedup for batched input.scipy.linalg.expm has been improved.scipy.linalg.solve has improved for batched inputs.scipy.linalg.bandwidth now supports batching for greater than or equal to
2 dimensional input.scipy.optimize improvementstrust_constr method for minimize was adjusted so that if the x
array would result in infeasible constraints, and those constraints were
marked as keep_feasible, then the objective function is not called with
that x array.COBYQA method for minimize now supports being called
concurrently by multiple threads. Previously, multiple threads calling this
function would only run one at a time.scipy.optimize.nnls, and minimize methods SLSQP and L-BFGS-B
now have support for ILP64 LAPACK, when available.scipy.optimize.elementwise now support passing kwargs
to the callable function.scipy.signal improvements~scipy.signal.whittaker_henderson implements Whittaker-Henderson smoothing
of a discrete signal. It offers different penalties to control the smoothness as well
as automatic selection of the penalty strength via optimization of the restricted
maximum likelihood (REML) criterion.
It is a valuable alternative for the Savitzky-Golay filter
~scipy.signal.savgol_filter.
In econometrics, Whittaker-Henderson graduation of penalty order 2 is also known as
Hodrick-Prescott filter.lfilter_zi was refactored for improved numerical stability and
efficiency. It now raises a ValueError if parameter a has leading
zeros, i.e., a[0] == 0, since lfilter and filtfilt do not support
that as well. Furthermore, a ValueError instead of a LinAlgError is
raised if the filter is unstable due to having a pole at z = 1.scipy.sparse improvementsscipy.sparse.csgraph the computation of strongly connected components
for directed graphs is now 2x faster with better cache locality, using
algorithmic improvements described in the recent survey by Tarjan and Zwick.matrix_transpose/.mT.scipy.sparse.linalg.LinearOperator, and LinearOperator now has
a new rdot method.scipy.sparse.linalg.minres now supports complex hermitian matrices.scipy.integrate improvementsscipy.integrate.tanhsinh and scipy.integrate.nsum now support passing
kwargs to the function to be integrated.scipy.spatial improvementsscipy.spatial.SphericalVoronoi.scipy.spatial.distance.minkowski,
scipy.spatial.distance.euclidean, and scipy.spatial.distance.sqeuclidean.KDTree.sparse_distance_matrix.Rotation and RigidTransform directly,
by automatically promoting Rotation when the two are composed via
a multiplication operator.scipy.special improvementsscipy.special.bdtrik,
scipy.special.bdtrin, scipy.special.nbdtrik, scipy.special.nbdtrin.scipy.special.eval_jacobi has been improved
for several parameter combinations.scipy.special.j0 and scipy.special.y0
have improved accuracy for large arguments.scipy.stats improvementsscipy.stats.pmean with tiny, nonzero p has been
improved.scipy.stats.halfgennorm has been improved.zstatistic has been added to the result object of
scipy.stats.mannwhitneyu.stats functions now support lazy arrays and JAX
JIT (see Python Array API support section below).nan_policy keyword argument has been added to:
scipy.stats.obrientransform, scipy.stats.boxcox,
scipy.stats.boxcox_normmax, scipy.stats.yeojohnson,
scipy.stats.yeojohnson_normmax, scipy.stats.sigmaclip, and
scipy.stats.expectile.scipy.stats.ContinuousDistribution.lmoment has been added for computing
population L-moments.scipy.stats.estimated_cdf has been added. It reproduces
much of the functionality of stats.mstats.plotting_positions,
stats.percentileofscore, stats.ecdf.cdf, and stats.cumfreq, but
is also vectorized.scipy.stats.ansari accepts a new method argument.scipy.stats.bws_test, scipy.stats.expectile, and
scipy.stats.quantile_test now accept an axis argument.scipy.stats.expectile and scipy.stats.quantile_test accept a new
keepdims argument.scipy.stats.binomtest now supports batching of k, n, and p.interpolate.PPoly,
interpolate.BPoly, and interpolate.BSpline.scipy.stats.rankdata.method and trim usage
in scipy.stats.ttest_ind.scipy.stats.cramervonmises,
scipy.stats.ks_1samp, scipy.stats.ks_2samp, scipy.stats.mode,
scipy.stats.rankdata, scipy.stats.kruskal, scipy.stats.brunnermunzel,
scipy.stats.spearmanrho, scipy.stats.friedmanchisquare,
scipy.stats.cramervonmises_2samp, scipy.stats.mannwhitneyu,
scipy.stats.wilcoxon, scipy.stats.fligner, scipy.stats.linregress,
scipy.stats.alexandergovern, and scipy.stats.levene.scipy.stats.quantile_test,
scipy.stats.kendalltau (via NumPy conversion), scipy.stats.kstest,
scipy.sparse.linalg.LinearOperator, scipy.stats.cumfreq,
scipy.stats.relfreq, scipy.stats.ks_2samp, scipy.stats.theilslopes,
scipy.stats.siegelslopes, scipy.stats.obrientransform (including marray),
scipy.stats.binomtest, scipy.integrate.fixed_quad, scipy.signal.square,
scipy.stats.expectile, scipy.stats.shapiro, scipy.stats.pointbiserialr,
scipy.stats.bws_test, scipy.stats.estimated_cdf (new function),
scipy.stats.linregress, scipy.integrate.simpson, and
scipy.signal.sawtooth.torch support for scipy.signal.fftconvolve now correctly
handles the float32 dtype.scipy.stats.binomtest
(except for method='two-sided'), scipy.stats.mannwhitneyu
(except for method='auto'), scipy.stats.lmoment, scipy.stats.moment,
scipy.stats.ansari (related to new method argument),
scipy.stats.yeojohnson_llf, scipy.stats.epps_singleton_2samp,
scipy.stats.wilcoxon (except for method='exact' and method='auto'),
scipy.stats.rankdata (via delegation), scipy.signal.oaconvolve,
scipy.signal.hilbert, and scipy.signal.hilbert2.lwork parameter to scipy.linalg.qr has been deprecated. The
functionality was rarely used; the function computes the optimal size of the
work arrays automatically, therefore users should simply remove their uses
of the lwork parameter.kron, kronsum and block_diag
choose return type sparray or spmatrix depending on the type of the
sparse input arrays. When no inputs are sparse, the output is chosen to be
spmatrix. That has been deprecated. The return type when no inputs are
sparse will be changing to sparray. You can control the output type by
ensuring that at least one input array is sparse. If any are sparray,
the output will be sparray. If all sparse inputs are spmatrix,
the output will be spmatrix.FutureWarning is now issued for calling {r}matvec on column vectors
with LinearOperator. Identical behavior can be achieved (and extended to
batch dimensions) via {r}matmat.scipy.linalg functions are now stricter--using non-LAPACK dtypes is
deprecated. When the deprecations expire, this will effectively limit the
dtypes allowed in linear algebra functions to: integers (upcast to float),
and single/double precision float/complex dtypes.scipy.spatial.minkowsi_distance, scipy.spatial.minkowsi_distance_p,
and scipy.spatial.distance_matrix have been deprecated in favor of
other superior functions.scipy.spatial.tsearch has been deprecated because it duplicates functionality
more conveniently provided within the Delaunay class proper.scipy.interpolate.pade, scipy.interpolate.lagrange,
and scipy.interpolate.approximate_taylor_polynomial.spmatrix=True for the scipy.io readers mmio, FFM, hb,
and matlab/_mio is now deprecated, including when set as the default
value.scipy.cluster.vq.py_vq has been deprecated.scipy.stats.rankdata is now always of a floating point
dtype -- the result dtype of the input and a Python float.residuals returned by scipy.linalg.lstsq has been
changed. For lapack_driver == "gelsy" or the system being either
underdetermined or square, empty residuals are still returned. For
lapack_driver == "gesld"/"gelss" in combination with an overdetermined
system a non-empty residual is always returned. However, in the case where a
slice is not full column rank, the corresponding residual is set to NaN.scipy.stats.contingency.crosstab when kwarg
sparse=True is now a sparse array holding the counts instead of a sparse
matrix. This allows it to be nD, so can accept more than 2 sequences as
inputs, but it is a different class. Most operations work the same for
sparse arrays and matrixes with notable differences for matrix: * means
matmul and always-2D. For more info see migration_to_sparray.scipy.stats.obrientransform now returns a tuple of arrays instead of
a single ndarray.scipy.stats.multinomial now returns NaNs when the category probability
(p) rows/arrays do not sum to unity. This is an expiration of the deprecated
behavior of adjusting the final element in the p array to compensate.
Note that multinomial.rvs will now raise an error in such cases, since it
has an integral return type.iprint and disp parameters of scipy.optimize.fmin_l_bfgs_b
have been removed, following the expiry of their deprecation.scipy.linalg.{sqrtm, logm, signm}, disp (and sqrtm
blocksize) parameters were removed (expired deprecations).atol argument of scipy.optimize.nnls has been
removed.scipy.linalg.bandwidth has changed from
(int, int) to (np.int64, np.int64).scipy.linalg.cho_factor changed from bool
to NDArray[np.bool].scipy.interpolate.splint changed from a 1D
float64 array to None when full_output=True.k and n attributes of the BinomTestResult
object returned by scipy.stats.binomtest have changed from int to
np.float64.Boost.Math was updated from 1.89.0 to 1.91.0._without-fortran,
which allows building SciPy from source in the absence of a Fortran compiler.
This is an early prototype of the planned capability of a Fortran-free
SciPy.scipy.interpolate._regrid function may be of experimental
interest. It provides an interface for 2-D smoothing B-spline fitting via
separable 1-D FITPACK kernels. It is under consideraton for public exposure
in some form in the future.3.13t (3.13 free threading) wheels are not provided on PyPI for this
and subsequent releases because 3.13t was deprecated by manylinux and
dropped by cibuildwheel in favor of 3.14t.scipy.linalg.eig were always Fortran-ordered, and in
SciPy 1.18.0 they may or may not be. If the ordering is important (for example,
when interfacing with compiled code which expects specific array strides), users
should ensure the desired ordering manually.A total of 103 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.
Note that the source and binary assets associated with this release were published to PyPI using trusted publishing, and so the trusted assets and their hashes are made available more securely at https://pypi.org/project/scipy/1.18.0/ rather than providing them here in a less secure manner.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
note: SciPy 1.18.0 is not released yet!
SciPy 1.18.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.18.x branch, and on adding new features on the main branch.
This release requires Python 3.12-3.14 and NumPy 2.0.0 or greater.
cython_lapack
consumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
has been substantially improved across the SciPy library.scipy.signal.whittaker_henderson now provides access to Whittaker-Henderson
smoothing of a discrete signal.scipy.stats functions now support lazy arrays and JAX
JIT. Array API support has been improved substantially in SciPy, with at least
21 functions gaining new support in this release. 16 scipy.stats functions
have also gained support for MArray input.scipy.fft improvementspocketfft to its
successor package ducc0.fft, which features several incremental
improvements. The most significant of those from SciPy's perspective is
probably that storage requirements for internally cached plans have been
significantly reduced for most long 1D transforms. Plans that require more
storage than 1MB will no longer be cached; this mainly affects huge 1D
transforms of prime and near-prime sizes.scipy.interpolate improvementssimplex_tolerance argument to the _call__ methods of
LinearNDInterpolator and CloughTocher2dInterpolator. This can
help users avoid holes in certain interpolation problems.scipy.differentiate improvementsscipy.differentiate.derivative now supports passing kwargs to the
function whose derivative is desired.scipy.linalg improvementscython_blas/cython_lapack/
linalg.blas/linalg.lapack (support for Accelerate and MKL).cython_lapack users to gracefully
handle LP64/ILP64 backend builds. Worked examples, including build system
details, have been included in this release.overwrite_b keyword argument was added to eigvals, for consistency
with other similar linalg functions.linalg.cholesky now leverages symmetry properties for performance
improvements, especially for real matrices. The batching loop of cholesky
has now also been moved to a C implementation.scipy.linalg.lu and scipy.linalg.det have been rewritten in C++ with
batching support in the compiled code.scipy.linalg.expm and scipy.linalg.sqrtm.scipy.linalg.qr, scipy.linalg.eig,
scipy.linalg.lstsq, and scipy.linalg.svd have been moved to C,
providing a substantial speedup for batched input.scipy.linalg.expm has been improved.scipy.linalg.solve has improved for batched inputs.scipy.linalg.bandwidth now supports batching for greater than or equal to
2 dimensional input.scipy.optimize improvementstrust_constr method for minimize was adjusted so that if the x
array would result in infeasible constraints, and those constraints were
marked as keep_feasible, then the objective function is not called with
that x array.COBYQA method for minimize now supports being called
concurrently by multiple threads. Previously, multiple threads calling this
function would only run one at a time.scipy.optimize.nnls, and minimize methods SLSQP and L-BFGS-B
now have support for ILP64 LAPACK, when available.scipy.optimize.elementwise now support passing kwargs
to the callable function.scipy.signal improvements~scipy.signal.whittaker_henderson implements Whittaker-Henderson smoothing
of a discrete signal. It offers different penalties to control the smoothness as well
as automatic selection of the penalty strength via optimization of the restricted
maximum likelihood (REML) criterion.
It is a valuable alternative for the Savitzky-Golay filter
~scipy.signal.savgol_filter.
In econometrics, Whittaker-Henderson graduation of penalty order 2 is also known as
Hodrick-Prescott filter.lfilter_zi was refactored for improved numerical stability and
efficiency. It now raises a ValueError if parameter a has leading
zeros, i.e., a[0] == 0, since lfilter and filtfilt do not support
that as well. Furthermore, a ValueError instead of a LinAlgError is
raised if the filter is unstable due to having a pole at z = 1.scipy.sparse improvementsscipy.sparse.csgraph the computation of strongly connected components
for directed graphs is now 2x faster with better cache locality, using
algorithmic improvements described in the recent survey by Tarjan and Zwick.matrix_transpose/.mT.scipy.sparse.linalg.LinearOperator, and LinearOperator now has
a new rdot method.scipy.sparse.linalg.minres now supports complex hermitian matrices.scipy.integrate improvementsscipy.integrate.tanhsinh and scipy.integrate.nsum now support passing
kwargs to the function to be integrated.scipy.spatial improvementsscipy.spatial.SphericalVoronoi.scipy.spatial.distance.minkowski,
scipy.spatial.distance.euclidean, and scipy.spatial.distance.sqeuclidean.KDTree.sparse_distance_matrix.Rotation and RigidTransform directly,
by automatically promoting Rotation when the two are composed via
a multiplication operator.scipy.special improvementsscipy.special.bdtrik,
scipy.special.bdtrin, scipy.special.nbdtrik, scipy.special.nbdtrin.scipy.special.eval_jacobi has been improved
for several parameter combinations.scipy.special.j0 and scipy.special.y0
have improved accuracy for large arguments.scipy.stats improvementsscipy.stats.pmean with tiny, nonzero p has been
improved.scipy.stats.halfgennorm has been improved.zstatistic has been added to the result object of
scipy.stats.mannwhitneyu.stats functions now support lazy arrays and JAX
JIT (see Python Array API support section below).nan_policy keyword argument has been added to:
scipy.stats.obrientransform, scipy.stats.boxcox,
scipy.stats.boxcox_normmax, scipy.stats.yeojohnson,
scipy.stats.yeojohnson_normmax, scipy.stats.sigmaclip, and
scipy.stats.expectile.scipy.stats.ContinuousDistribution.lmoment has been added for computing
population L-moments.scipy.stats.estimated_cdf has been added. It reproduces
much of the functionality of stats.mstats.plotting_positions,
stats.percentileofscore, stats.ecdf.cdf, and stats.cumfreq, but
is also vectorized.scipy.stats.ansari accepts a new method argument.scipy.stats.bws_test, scipy.stats.expectile, and
scipy.stats.quantile_test now accept an axis argument.scipy.stats.expectile and scipy.stats.quantile_test accept a new
keepdims argument.scipy.stats.binomtest now supports batching of k, n, and p.interpolate.PPoly,
interpolate.BPoly, and interpolate.BSpline.scipy.stats.rankdata.method and trim usage
in scipy.stats.ttest_ind.scipy.stats.cramervonmises,
scipy.stats.ks_1samp, scipy.stats.ks_2samp, scipy.stats.mode,
scipy.stats.rankdata, scipy.stats.kruskal, scipy.stats.brunnermunzel,
scipy.stats.spearmanrho, scipy.stats.friedmanchisquare,
scipy.stats.cramervonmises_2samp, scipy.stats.mannwhitneyu,
scipy.stats.wilcoxon, scipy.stats.fligner, scipy.stats.linregress,
scipy.stats.alexandergovern, and scipy.stats.levene.scipy.stats.quantile_test,
scipy.stats.kendalltau (via NumPy conversion), scipy.stats.kstest,
scipy.sparse.linalg.LinearOperator, scipy.stats.cumfreq,
scipy.stats.relfreq, scipy.stats.ks_2samp, scipy.stats.theilslopes,
scipy.stats.siegelslopes, scipy.stats.obrientransform (including marray),
scipy.stats.binomtest, scipy.integrate.fixed_quad, scipy.signal.square,
scipy.stats.expectile, scipy.stats.shapiro, scipy.stats.pointbiserialr,
scipy.stats.bws_test, scipy.stats.estimated_cdf (new function),
scipy.stats.linregress, scipy.integrate.simpson, and
scipy.signal.sawtooth.torch support for scipy.signal.fftconvolve now correctly
handles the float32 dtype.scipy.stats.binomtest
(except for method='two-sided'), scipy.stats.mannwhitneyu
(except for method='auto'), scipy.stats.lmoment, scipy.stats.moment,
scipy.stats.ansari (related to new method argument),
scipy.stats.yeojohnson_llf, scipy.stats.epps_singleton_2samp,
scipy.stats.wilcoxon (except for method='exact' and method='auto'),
scipy.stats.rankdata (via delegation), scipy.signal.oaconvolve,
scipy.signal.hilbert, and scipy.signal.hilbert2.lwork parameter to scipy.linalg.qr has been deprecated. The
functionality was rarely used; the function computes the optimal size of the
work arrays automatically, therefore users should simply remove their uses
of the lwork parameter.kron, kronsum and block_diag
choose return type sparray or spmatrix depending on the type of the
sparse input arrays. When no inputs are sparse, the output is chosen to be
spmatrix. That has been deprecated. The return type when no inputs are
sparse will be changing to sparray. You can control the output type by
ensuring that at least one input array is sparse. If any are sparray,
the output will be sparray. If all sparse inputs are spmatrix,
the output will be spmatrix.FutureWarning is now issued for calling {r}matvec on column vectors
with LinearOperator. Identical behavior can be achieved (and extended to
batch dimensions) via {r}matmat.scipy.linalg functions are now stricter--using non-LAPACK dtypes is
deprecated. When the deprecations expire, this will effectively limit the
dtypes allowed in linear algebra functions to: integers (upcast to float),
and single/double precision float/complex dtypes.scipy.spatial.minkowsi_distance, scipy.spatial.minkowsi_distance_p,
and scipy.spatial.distance_matrix have been deprecated in favor of
other superior functions.scipy.spatial.tsearch has been deprecated because it duplicates functionality
more conveniently provided within the Delaunay class proper.scipy.interpolate.pade, scipy.interpolate.lagrange,
and scipy.interpolate.approximate_taylor_polynomial.spmatrix=True for the scipy.io readers mmio, FFM, hb,
and matlab/_mio is now deprecated, including when set as the default
value.scipy.cluster.vq.py_vq has been deprecated.scipy.stats.rankdata is now always of a floating point
dtype -- the result dtype of the input and a Python float.residuals returned by scipy.linalg.lstsq has been
changed. For lapack_driver == "gelsy" or the system being either
underdetermined or square, empty residuals are still returned. For
lapack_driver == "gesld"/"gelss" in combination with an overdetermined
system a non-empty residual is always returned. However, in the case where a
slice is not full column rank, the corresponding residual is set to NaN.scipy.stats.contingency.crosstab when kwarg
sparse=True is now a sparse array holding the counts instead of a sparse
matrix. This allows it to be nD, so can accept more than 2 sequences as
inputs, but it is a different class. Most operations work the same for
sparse arrays and matrixes with notable differences for matrix: * means
matmul and always-2D. For more info see migration_to_sparray.scipy.stats.obrientransform now returns a tuple of arrays instead of
a single ndarray.scipy.stats.multinomial now returns NaNs when the category probability
(p) rows/arrays do not sum to unity. This is an expiration of the deprecated
behavior of adjusting the final element in the p array to compensate.
Note that multinomial.rvs will now raise an error in such cases, since it
has an integral return type.iprint and disp parameters of scipy.optimize.fmin_l_bfgs_b
have been removed, following the expiry of their deprecation.scipy.linalg.{sqrtm, logm, signm}, disp (and sqrtm
blocksize) parameters were removed (expired deprecations).atol argument of scipy.optimize.nnls has been
removed.scipy.linalg.bandwidth has changed from
(int, int) to (np.int64, np.int64).scipy.linalg.cho_factor changed from bool
to NDArray[np.bool].scipy.interpolate.splint changed from a 1D
float64 array to None when full_output=True.k and n attributes of the BinomTestResult
object returned by scipy.stats.binomtest have changed from int to
np.float64.Boost.Math was updated from 1.89.0 to 1.91.0._without-fortran,
which allows building SciPy from source in the absence of a Fortran compiler.
This is an early prototype of the planned capability of a Fortran-free
SciPy.scipy.interpolate._regrid function may be of experimental
interest. It provides an interface for 2-D smoothing B-spline fitting via
separable 1-D FITPACK kernels. It is under consideraton for public exposure
in some form in the future.A total of 102 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.
Note that the source and binary assets associated with this release candidate were published to PyPI using trusted publishing, and so the trusted assets and their hashes are made available more securely at https://pypi.org/project/scipy/1.18.0rc2/ rather than providing them here in a less secure manner.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
note: SciPy 1.18.0 is not released yet!
SciPy 1.18.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.18.x branch, and on adding new features on the main branch.
This release requires Python 3.12-3.14 and NumPy 2.0.0 or greater.
cython_lapack
consumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
has been substantially improved across the SciPy library.scipy.signal.whittaker_henderson now provides access to Whittaker-Henderson
smoothing of a discrete signal.scipy.stats functions now support lazy arrays and JAX
JIT. Array API support has been improved substantially in SciPy, with at least
21 functions gaining new support in this release. 16 scipy.stats functions
have also gained support for MArray input.scipy.fft improvementspocketfft to its
successor package ducc0.fft, which features several incremental
improvements. The most significant of those from SciPy's perspective is
probably that storage requirements for internally cached plans have been
significantly reduced for most long 1D transforms. Plans that require more
storage than 1MB will no longer be cached; this mainly affects huge 1D
transforms of prime and near-prime sizes.scipy.interpolate improvementssimplex_tolerance argument to the _call__ methods of
LinearNDInterpolator and CloughTocher2dInterpolator. This can
help users avoid holes in certain interpolation problems.scipy.differentiate improvementsscipy.differentiate.derivative now supports passing kwargs to the
function whose derivative is desired.scipy.linalg improvementscython_blas/cython_lapack/
linalg.blas/linalg.lapack (support for Accelerate and MKL).cython_lapack users to gracefully
handle LP64/ILP64 backend builds. Worked examples, including build system
details, have been included in this release.overwrite_b keyword argument was added to eigvals, for consistency
with other similar linalg functions.linalg.cholesky now leverages symmetry properties for performance
improvements, especially for real matrices. The batching loop of cholesky
has now also been moved to a C implementation.scipy.linalg.lu and scipy.linalg.det have been rewritten in C++ with
batching support in the compiled code.scipy.linalg.expm and scipy.linalg.sqrtm.scipy.linalg.qr, scipy.linalg.eig,
scipy.linalg.lstsq, and scipy.linalg.svd have been moved to C,
providing a substantial speedup for batched input.scipy.linalg.expm has been improved.scipy.linalg.solve has improved for batched inputs.scipy.optimize improvementstrust_constr method for minimize was adjusted so that if the x
array would result in infeasible constraints, and those constraints were
marked as keep_feasible, then the objective function is not called with
that x array.COBYQA method for minimize now supports being called
concurrently by multiple threads. Previously, multiple threads calling this
function would only run one at a time.scipy.optimize.nnls, and minimize methods SLSQP and L-BFGS-B
now have support for ILP64 LAPACK, when available.scipy.optimize.elementwise now support passing kwargs
to the callable function.scipy.signal improvements~scipy.signal.whittaker_henderson implements Whittaker-Henderson smoothing
of a discrete signal. It offers different penalties to control the smoothness as well
as automatic selection of the penalty strength via optimization of the restricted
maximum likelihood (REML) criterion.
It is a valuable alternative for the Savitzky-Golay filter
~scipy.signal.savgol_filter.
In econometrics, Whittaker-Henderson graduation of penalty order 2 is also known as
Hodrick-Prescott filter.lfilter_zi was refactored for improved numerical stability and
efficiency. It now raises a ValueError if parameter a has leading
zeros, i.e., a[0] == 0, since lfilter and filtfilt do not support
that as well. Furthermore, a ValueError instead of a LinAlgError is
raised if the filter is unstable due to having a pole at z = 1.scipy.sparse improvementsscipy.sparse.csgraph the computation of strongly connected components
for directed graphs is now 2x faster with better cache locality, using
algorithmic improvements described in the recent survey by Tarjan and Zwick.matrix_transpose/.mT.scipy.sparse.linalg.LinearOperator.scipy.sparse.linalg.minres now supports complex hermitian matrices.scipy.integrate improvementsscipy.integrate.tanhsinh and scipy.integrate.nsum now support passing
kwargs to the function to be integrated.scipy.spatial improvementsscipy.spatial.SphericalVoronoi.scipy.spatial.distance.minkowski,
scipy.spatial.distance.euclidean, and scipy.spatial.distance.seuclidean.KDTree.sparse_distance_matrix.Rotation and RigidTransform directly,
by automatically promoting Rotation when the two are composed via
a multiplication operator.scipy.special improvementsscipy.special.bdtrik,
scipy.special.bdtrin, scipy.special.nbdtrik, scipy.special.nbdtrin.scipy.special.eval_jacobi has been improved
for several parameter combinations.scipy.special.j0 and scipy.special.y0
have improved accuracy for large arguments.scipy.stats improvementsscipy.stats.pmean with tiny, nonzero p has been
improved.scipy.stats.halfgennorm has been improved.zstatistic has been added to the result object of
scipy.stats.mannwhitneyu.stats functions now support lazy arrays and JAX
JIT (see Python Array API support section below).nan_policy keyword argument has been added to:
scipy.stats.obrientransform, scipy.stats.boxcox,
scipy.stats.boxcox_normmax, scipy.stats.yeojohnson,
scipy.stats.yeojohnson_normmax, and scipy.stats.sigmaclip.scipy.stats.ContinuousDistribution.lmoment has been added for computing
population L-moments.interpolate.PPoly,
interpolate.BPoly, and interpolate.BSpline.scipy.stats.rankdata.method and trim usage
in scipy.stats.ttest_ind.scipy.stats.cramervonmises,
scipy.stats.ks_1samp, scipy.stats.ks_2samp, scipy.stats.mode,
scipy.stats.rankdata, scipy.stats.kruskal, scipy.stats.brunnermunzel,
scipy.stats.spearmanrho, scipy.stats.friedmanchisquare,
scipy.stats.cramervonmises_2samp, scipy.stats.mannwhitneyu,
scipy.stats.wilcoxon, scipy.stats.fligner, scipy.stats.linregress,
scipy.stats.alexandergovern, and scipy.stats.levene.scipy.stats.quantile_test,
scipy.stats.kendalltau (via NumPy conversion), scipy.stats.kstest,
scipy.sparse.linalg.LinearOperator, scipy.stats.cumfreq,
scipy.stats.relfreq, scipy.stats.ks_2samp, scipy.stats.theilslopes,
scipy.stats.siegelslopes, scipy.stats.obrientransform (including marray),
scipy.stats.binomtest, scipy.integrate.fixed_quad, scipy.signal.square,
scipy.stats.expectile, scipy.stats.shapiro, scipy.stats.pointbiserialr,
scipy.stats.bws_test, scipy.stats.estimated_cdf (new function),
scipy.stats.linregress, scipy.integrate.simpson, and
scipy.signal.sawtooth.torch support for scipy.signal.fftconvolve now correctly
handles the float32 dtype.scipy.stats.binomtest
(except for method='two-sided'), scipy.stats.mannwhitneyu
(except for method='auto'), scipy.stats.lmoment, scipy.stats.moment,
scipy.stats.ansari (related to new method argument),
scipy.stats.yeojohnson_llf, scipy.stats.epps_singleton_2samp,
scipy.stats.wilcoxon (except for method='exact' and method='auto'),
scipy.stats.rankdata (via delegation), scipy.signal.oaconvolve,
scipy.signal.hilbert, and scipy.signal.hilbert2.lwork parameter to scipy.linalg.qr has been deprecated. The
functionality was rarely used; the function computes the optimal size of the
work arrays automatically, therefore users should simply remove their uses
of the lwork parameter.kron, kronsum and build_diag
choose return type sparray or spmatrix depending on the type of the
sparse input arrays. When no inputs are sparse, the output is chosen to be
spmatrix. That has been deprecated. The return type when no inputs are
sparse will be changing to sparray. You can control the output type by
ensuring that at least one input array is sparse. If any are sparray,
the output will be sparray. If all sparse inputs are spmatrix,
the output will be spmatrix.FutureWarning is now issued for calling {r}matvec on column vectors
with LinearOperator. Identical behavior can be achieved (and extended to
batch dimensions) via {r}matmat.scipy.linalg functions are now stricter--using non-LAPACK dtypes is
deprecated. When the deprecations expire, this will effectively limit the
dtypes allowed in linear algebra functions to: integers (upcast to float),
and single/double precision float/complex dtypes.scipy.spatial.minkowsi_distance, scipy.spatial.minkowsi_distance_p,
and scipy.spatial.distance_matrix have been deprecated in favor of
other superior functions.scipy.spatial.tsearch has been deprecated because it duplicates functionality
more conveniently provided within the Delaunay class proper.scipy.interpolate.pade, scipy.interpolate.lagrange,
and scipy.interpolate.approximate_taylor_polynomial.spmatrix=True for the scipy.io readers mmio, FFM, hb,
and matlab/_mio is now deprecated, including when set as the default
value.scipy.cluster.vq.py_vq has been deprecated.scipy.stats.rankdata is now always of a floating point
dtype -- the result dtype of the input and a Python float.residuals returned by scipy.linalg.lstsq has been
changed. For lapack_driver == "gelsy" or the system being either
underdetermined or square, empty residuals are still returned. For
lapack_driver == "gesld"/"gelss" in combination with an overdetermined
system a non-empty residual is always returned. However, in the case where a
slice is not full column rank, the corresponding residual is set to NaN.scipy.stats.contingency.crosstab when kwarg
sparse=True is now a sparse array holding the counts instead of a sparse
matrix. This allows it to be nD, so can accept more than 2 sequences as
inputs, but it is a different class. Most operations work the same for
sparse arrays and matrixes with notable differences for matrix: * means
matmul and always-2D. For more info see migration_to_sparray.scipy.stats.obrientransform now returns a tuple of arrays instead of
a single ndarray.scipy.stats.multinomial now returns NaNs when the category probability
(p) rows/arrays do not sum to unity. This is an expiration of the deprecated
behavior of adjusting the final element in the p array to compensate.
Note that multinomial.rvs will now raise an error in such cases, since it
has an integral return type.iprint and disp parameters of scipy.optimize.fmin_l_bfgs_b
have been removed, following the expiry of their deprecation.scipy.linalg.{sqrtm, logm, signm}, disp (and sqrtm
blocksize) parameters were removed (expired deprecations).atol argument of scipy.optimize.nnls has been
removed.Boost.Math was updated from 1.89.0 to 1.91.0._without-fortran,
which allows building SciPy from source in the absence of a Fortran compiler.
This is an early prototype of the planned capability of a Fortran-free
SciPy.scipy.interpolate._regrid function may be of experimental
interest. It provides an interface for 2-D smoothing B-spline fitting via
separable 1-D FITPACK kernels. It is under consideraton for public exposure
in some form in the future.A total of 100 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.
Note that the source and binary assets associated with this release candidate were published to PyPI using trusted publishing, and so the trusted assets and their hashes are made available more securely at https://pypi.org/project/scipy/1.18.0rc1/ rather than providing them here in a less secure manner.
SciPy 1.17.1 is a bug-fix release with no new features compared to 1.17.0.
SciPy 1.17.1 is a bug-fix release with no new features compared to 1.17.0.
A total of 13 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.
Complete issue list, PR list, and release asset hashes are available in the associated README.txt.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
SciPy 1.17.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.17.x branch, and on adding new features on the main branch.
This release requires Python 3.11-3.14 and NumPy 1.26.4 or greater.
scipy.sparse, coo_array now supports indexing. This includes integers,
slices, arrays, np.newaxis, Ellipsis, in 1D, 2D and the relatively
new nD. In scipy.sparse.linalg, ARPACK and PROPACK rewrites from Fortran77
to C now empower the use of external pseudorandom number generators, e.g.
from numpy.scipy.spatial, transform.Rotation and transform.RigidTransform
have been extended to support N-D arrays. geometric_slerp now has support
for extrapolation.scipy.stats has gained the matrix t and logistic distributions and many
performance and accuracy improvements.scipy.integrate improvementsdopri5, dopri853, LSODA, vode, and
zvode have been ported from Fortran77 to C.scipy.integrate.quad now has a fast path for returning 0 when the integration
interval is empty.BDF, DOP853, RK23, RK45, OdeSolver, DenseOutput,
ode, and complex_ode classes now support subscription, making them
generic types, for compatibility with scipy-stubs.scipy.cluster improvementsscipy.cluster.hierarchy.is_isomorphic has improved performance and array
API support.scipy.interpolate improvementsbc_type argument has been added to scipy.interpolate.make_splrep,
scipy.interpolate.make_splprep, and scipy.interpolate.generate_knots to
control the boundary conditions for spline fitting. Allowed values are
"not-a-knot" (default) and "periodic".derivative method has been added to the
scipy.interpolate.NdBSpline class, to construct a new spline representing a
partial derivative of the given spline. This method is similar to the
BSpline.derivative method of 1-D spline objects. In addition, the
NdBSpline mutable instance attribute .c was changed into a read-only
@property."cubic" and "quintic" modes of
scipy.interpolate.RegularGridInterpolator has been improved. Furthermore,
the (mutable) instance attributes .grid and .values were changed into
(read-only) properties.scipy.interpolate.AAA has been improved and it has
gained a new axis parameter.scipy.interpolate.FloaterHormannInterpolator added support for
multidimensional, batched inputs and gained a new axis parameter to
select the interpolation axis.RBFInterpolator has gained an array API standard compatible backend, with an
improved support for GPU arrays.AAA, *Interpolator, *Poly, and *Spline classes now
support subscription, making them generic types, for compatibility with
scipy-stubs.scipy.linalg improvementsscipy.linalg.inv routine has been improved:
assume_a keyword
allows to bypass the structure detection if the structure is known. For
batched inputs, the detection is run for each 2D slice, unless an explicit
value for assume_a is provided (in which case, the structure is
assumed to be the same for all 2-D slices of the batch);lower={True,False} keyword argument has been added to help
select the upper or lower triangle of the input matrix for symmetric
inputs; refer to the docstring of scipy.linalg.inv for details;LinAlgWarning if it detects an ill-conditioned
input;scipy.linalg.fiedler has gained native support for batched inputs.
performance has improved for scipy.linalg.solve with batched inputs
for certain matrix structures.
scipy.optimize improvementsoptimize.minimize(method="trust-exact") now accepts a
solver-specific "subproblem_maxiter" option. This option can be used to
assure that the algorithm converges for functions with an ill-conditioned
Hessian.optimize.minimize(method="slsqp") can
opt into the new callback interface by accepting a single keyword argument
intermediate_result.BroydenFirst, *Jacobian, and Bounds classes now support
subscription, making them generic types, for compatibility with
scipy-stubs.scipy.signal improvementsscipy.signal.abcd_normalize gained more informative error messages and the
documentation was improved.scipy.signal.get_window now accepts the suffixes '_periodic' and
'_symmetric' to distinguish between periodic and symmetric windows
(overriding the fftbin parameter). This benefits the functions
coherence, csd, periodogram, welch, spectrogram,
stft, istft, resample, resample_poly, firwin,
firwin2, firwin_2d, check_COLA and check_NOLA, which utilize
get_window but do not expose the fftbin parameter.scipy.signal.hilbert2 gained the new keyword axes for specifying the
axes along which the two-dimensional analytic signal should be calculated.
Furthermore, the documentation of scipy.signal.hilbert and
scipy.signal.hilbert2 was significantly improved.ShortTimeFFT and LinearTimeInvariant classes now support
subscription, making them generic types, for compatibility with
scipy-stubs.scipy.sparse improvementscoo_array now supports indexing. This includes slices, arrays,
np.newaxis, Ellipsis, in 1D, 2D and the new nD. So COO format now
has full support for nD and COO now allows indexing without converting
formats.expand_dims,
swapaxes, permute_dims, and nD support for the kron function.scipy.sparse.dok_array now supports an update method which can be
used to update the sparse array using a dict, dict.items()-like iterable,
or another dok_array matrix. It performs additional validation that keys
are valid index tuples.scipy.sparse.dia_array.tocsr is approximately three times faster and
some unnecessary copy operations have been removed from sparse format
interconversions more broadly.scipy.sparse.linalg.funm_multiply_krylov, a restarted Krylov method
for evaluating y = f(tA) b.sparse.linalg, the LinearOperator, LaplacianNd, and SuperLU
classes now support subscription, making them generic types, for
compatibility with scipy-stubs.sparse.linalg the eigs and eigsh functions now accept a new
rng parameter.scipy.spatial improvementsThe spatial.transform module has gained an array API standard compatible
backend.
transform.Rotation and transform.RigidTransform have been extended
from 0D single values and 1D arrays to N-D arrays, with standard indexing and
broadcasting rules. Both now have the following additions:
shape property.shape argument to their identity() constructors, which should be
preferred over the existing num argument. This has also been added as an
argument for Rotation.random() (RigidTransform does not currently
have a random constructor).axis argument to their mean() functions.The resulting shapes for transform.Rotation.from_euler /
from_davenport have changed to make them consistent with broadcasting
rules. Angle inputs to Euler angles must now strictly match the number of
provided axes in the last dimension. The resulting Rotation has the shape
np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must
also match the number of axes in the last dimension. The resulting Rotation
has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).
Rotation.from_matrix has gained an assume_valid argument that allows for
performance improvements when users can guarantee valid matrix inputs.
from_matrix is now also faster in cases where a known orthogonal matrix
is used.
The scipy.spatial.geometric_slerp function can now extrapolate. When given a
value outside the range [0, 1], geometric_slerp() will continue with
the same rotation outside this range. For example, if spherically
interpolating with start being a point on the equator, and end
being a point at the north pole, then a value of t=-1 would give you a
point at the south pole.
Rotation.as_euler and Rotation.as_davenport methods have gained a
suppress_warnings parameter to enable suppression of gimbal lock warnings.
Rotation.__init__ has gained a new optional scalar_first parameter and
there is a new Rotation.__setitem__ method.
scipy.special improvementsbtdtria, btdtrib,
chdtriv, chndtr, chndtrix, chndtridf, chndtrinc, fdtr,
fdtrc, fdtri, gdtria, gdtrix, pdtrik, stdtr and
stdtrit.betainc, betaincc, betaincinv and
betainccinv are improved for extreme parameter ranges.scipy.stats improvementsscipy.stats.matrix_t has been added to represent the matrix t distribution.
It supports methods pdf (and logpdf) for computing the probability
density function and rvs for generating random variates.scipy.stats.Logistic was added for modeling random variables that follow a
logistic distribution.scipy.stats.quantile now accepts a weights argument to specify
frequency weights.scipy.stats.quantile is now faster on large arrays as it no longer uses
stable sort internally.scipy.stats.quantile supports three new values of the method argument,
'round_inward', 'round_outward', and 'round_neareast', for use in
the context of trimming and winsorizing data.scipy.stats.truncpareto now accepts negative values for the exponent shape
parameter, enabling use of truncpareto as a more general power law
distribution.scipy.stats.logser now provides a distribution-specific implementation of
the sf method, improving speed and accuracy.scipy.stats.ansari, scipy.stats.cramervonmises,
scipy.stats.cramervonmises_2samp, scipy.stats.epps_singleton_2samp,
scipy.stats.fligner, scipy.stats.friedmanchisquare, scipy.stats.kruskal,
scipy.stats.ks_1samp, scipy.stats.levene, and scipy.stats.mood.
Typically, this improves performance with multidimensional (batch) input.scipy.stats.anderson have been updated.method parameter of scipy.stats.anderson allows the user
to compute p-values by interpolating between tabulated values or using Monte
Carlo simulation. The method parameter must be passed explicitly
to add a pvalue attribute to the result object and avoid a warning
about the upcoming removal of critical_value, significance_level,
and fit_result attributes.variant parameter of scipy.stats.anderson_ksamp allows the user
to select between three different variants of the statistic, superseding the
midrank parameter which allowed toggling between two. The new 'continuous'
variant is equivalent to 'discrete' when there are no ties in the sample, but
the calculation is faster. The variant parameter must be passed explicitly to
avoid a warning about the deprecation of the midrank attribute and the upcoming
removal of critical_values from the result object.scipy.stats.zipfian methods has been
improved.scipy.stats.Binomial methods logcdf and
logccdf have been improved in the tails.scipy.stats.trapezoid.fit has been improved.cdf, sf, isf, and ppf methods
of scipy.stats.binom and scipy.stats.nbinom has been improved.Covariance, Uniform, Normal, Binomial, Mixture,
rv_frozen, and multi_rv_frozen classes now support subscription,
making them generic types, for compatibility with scipy-stubs.multivariate_t and multivariate_normal distributions have gained
a new marginal method.yeojohnson_llf gained new parameters axis, nan_policy,
and keepdims, and now returns a numpy scalar where it would previously
return a 0D array.spearmanrho function is an array API compatible substitute for
spearmanr.median_abs_deviation function has gained a keepdims parameter.trim_mean function has gained new nan_policy and keepdims
parameters.scipy.cluster.hierarchy.is_isomorphic has gained support.scipy.interpolate.make_lsq_spline, scipy.interpolate.make_smoothing_spline,
scipy.interpolate.make_splrep, scipy.interpolate.make_splprep,
scipy.interpolate.generate_knots, and scipy.interpolate.make_interp_spline
have gained support.scipy.signal.bilinear, scipy.signal.iircomb, scipy.signal.iirdesign,
scipy.signal.iirfilter, scipy.signal.iirpeak, scipy.signal.iirnotch,
scipy.signal.gammatone, and scipy.signal.group_delay have gained support.scipy.signal.butter, scipy.signal.buttap, scipy.signal.buttord,
scipy.signal.cheby1, scipy.signal.cheb1ap, scipy.signal.cheb1ord,
scipy.signal.cheby2, scipy.signal.cheb2ap, scipy.signal.cheb2ord,
scipy.signal.bessel, scipy.signal.besselap, scipy.signal.ellip,
scipy.signal.ellipap, and scipy.signal.ellipord have gained support.scipy.signal.savgol_filter, scipy.signal.savgol_coeffs, and
scipy.signal.abcd_normalize have gained support.spatial.transform has gained support.scipy.integrate.qmc_quad, scipy.integrate.cumulative_simpson,
scipy.integrate.cumulative_trapezoid, and scipy.integrate.romb have
gained support.scipy.linalg.block_diag, scipy.linalg.fiedler, and
scipy.linalg.orthogonal_procrustes have gained support.scipy.interpolate.BSpline, scipy.interpolate.NdBSpline,
scipy.interpolate.RegularGridInterpolator, and
scipy.interpolate.RBFInterpolator gained support.scipy.stats.alexandergovern, scipy.stats.bootstrap,
scipy.stats.brunnermunzel, scipy.stats.chatterjeexi,
scipy.stats.cramervonmises, scipy.stats.cramervonmises_2samp,
scipy.stats.epps_singleton_2samp, scipy.stats.false_discovery_control,
scipy.stats.fligner, scipy.stats.friedmanchisquare, scipy.stats.iqr,
scipy.stats.kruskal, scipy.stats.ks_1samp, scipy.stats.levene,
scipy.stats.lmoment, scipy.stats.mannwhitneyu,
scipy.stats.median_abs_deviation, scipy.stats.mode, scipy.stats.mood,
scipy.stats.ansari,
scipy.stats.power, scipy.stats.permutation_test, scipy.stats.sigmaclip,
scipy.stats.wilcoxon, and scipy.stats.yeojohnson_llf.scipy.stats.pearsonr has gained support for JAX and Dask backends.scipy.stats.variation has gained support for the Dask backend.marray support was added for stats.gtstd, stats.directional_stats,
stats.bartlett, stats.variation, stats.pearsonr, and
stats.entropy.scipy.odr module is deprecated in v1.17.0 and will be completely
removed in v1.19.0. Users are suggested to use the odrpack package instead.scipy.sparse.diags and
scipy.sparse.diags_array will change in v1.19.0.scipy.linalg.hankel will no longer ravel multidimensional
inputs and instead will treat them as a batch.precenter argument of scipy.signal.lombscargle is deprecated and
will be removed in v1.19.0. Furthermore, some arguments will become keyword
only.scipy.stats.anderson, the tuple-unpacking behavior of the return object
and attributes critical_values, significance_level, and
fit_result are deprecated. Use the new method parameter to avoid the
deprecation warning. Beginning in SciPy 1.19.0, these features will
no longer be available, and the object returned will have attributes
statistic and pvalue.scipy.stats.anderson_ksamp, the midrank parameter is deprecated
and the new variant parameter should be preferred. This also means that
the presence of the critical_values return array is deprecated.scipy.stats.find_repeats has been removed. Please use
numpy.unique/numpy.unique_counts instead.scipy.linalg functions for Toeplitz matrices no longer ravel n-d input
arguments; instead, multidimensional input is treated as a batch.seed and rand functions from scipy.linalg.interpolative have
been removed. Use the rng argument instead.scipy.spatial.distance.cosine and
scipy.spatial.distance.correlation now raise an error.scipy.signal.correlate, scipy.signal.convolve, scipy.signal.lfilter,
and scipy.signal.sosfilt.kulczynski1 and sokalmichener have been removed from
scipy.spatial.distance.kron has been removed from scipy.linalg. Please use numpy.kron.scipy.interpolate.interpnd.random_state and permutation arguments of
scipy.stats.ttest_ind have been removed.sph_harm, clpmn, lpn, and lpmn have been removed from
scipy.special.transform.Rotation.from_euler /
from_davenport have changed to make them consistent with broadcasting
rules. Angle inputs to Euler angles must now strictly match the number of
provided axes in the last dimension. The resulting Rotation has the shape
np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must
also match the number of axes in the last dimension. The resulting Rotation
has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).The version of the Boost Math library leveraged by SciPy has been
increased from 1.88.0 to 1.89.0.
On POSIX operating systems, SciPy will now use the 'forkserver'
multiprocessing context on Python 3.13 and older for workers=<an-int>
calls if the user hasn't configured a default method themselves. This follows
the default behavior on Python 3.14.
Initial support for 64-bit integer (ILP64) BLAS and LAPACK libraries has been
added. To enable it, build SciPy with -Duse-ilp64=true meson option, and make
sure to have a LAPACK library which exposes both LP64 and ILP64 symbols.
Currently supported LAPACK libraries are MKL and Apple Accelerate. Note that:
get_{blas,lapack}_funcs functions:
scipy.linalg.lapack.get_lapack_funcs(..., use_ilp64="preferred") selects
the ILP64 variant if available and LP64 variant otherwise;cython_blas and cython_lapack modules always contain the LP64
routines for ABI compatibility.Please report any issues with ILP64 you encounter.
A total of 117 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.
Complete issue list, PR list, and release asset hashes are available in the associated README.txt.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.17.0 is not released yet!
SciPy 1.17.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.17.x branch, and on adding new features on the main branch.
This release requires Python 3.11-3.14 and NumPy 1.26.4 or greater.
scipy.sparse, coo_array now supports indexing. This includes integers,
slices, arrays, np.newaxis, Ellipsis, in 1D, 2D and the relatively
new nD. In scipy.sparse.linalg, ARPACK and PROPACK rewrites from Fortran77
to C now empower the use of external pseudorandom number generators, e.g.
from numpy.scipy.spatial, transform.Rotation and transform.RigidTransform
have been extended to support N-D arrays. geometric_slerp now has support
for extrapolation.scipy.stats has gained the matrix t and logistic distributions and many
performance and accuracy improvements.scipy.integrate improvementsdopri5, dopri853, LSODA, vode, and
zvode have been ported from Fortran77 to C.scipy.integrate.quad now has a fast path for returning 0 when the integration
interval is empty.BDF, DOP853, RK23, RK45, OdeSolver, DenseOutput,
ode, and complex_ode classes now support subscription, making them
generic types, for compatibility with scipy-stubs.scipy.cluster improvementsscipy.cluster.hierarchy.is_isomorphic has improved performance and array
API support.scipy.interpolate improvementsbc_type argument has been added to scipy.interpolate.make_splrep,
scipy.interpolate.make_splprep, and scipy.interpolate.generate_knots to
control the boundary conditions for spline fitting. Allowed values are
"not-a-knot" (default) and "periodic".derivative method has been added to the
scipy.interpolate.NdBSpline class, to construct a new spline representing a
partial derivative of the given spline. This method is similar to the
BSpline.derivative method of 1-D spline objects. In addition, the
NdBSpline mutable instance attribute .c was changed into a read-only
@property."cubic" and "quintic" modes of
scipy.interpolate.RegularGridInterpolator has been improved. Furthermore,
the (mutable) instance attributes .grid and .values were changed into
(read-only) properties.scipy.interpolate.AAA has been improved and it has
gained a new axis parameter.scipy.interpolate.FloaterHormannInterpolator added support for
multidimensional, batched inputs and gained a new axis parameter to
select the interpolation axis.RBFInterpolator has gained an array API standard compatible backend, with an
improved support for GPU arrays.AAA, *Interpolator, *Poly, and *Spline classes now
support subscription, making them generic types, for compatibility with
scipy-stubs.scipy.linalg improvementsscipy.linalg.inv routine has been improved:
assume_a keyword
allows to bypass the structure detection if the structure is known. For
batched inputs, the detection is run for each 2D slice, unless an explicit
value for assume_a is provided (in which case, the structure is
assumed to be the same for all 2-D slices of the batch);lower={True,False} keyword argument has been added to help
select the upper or lower triangle of the input matrix for symmetric
inputs; refer to the docstring of scipy.linalg.inv for details;LinAlgWarning if it detects an ill-conditioned
input;scipy.linalg.fiedler has gained native support for batched inputs.
performance has improved for scipy.linalg.solve with batched inputs
for certain matrix structures.
scipy.optimize improvementsoptimize.minimize(method="trust-exact") now accepts a
solver-specific "subproblem_maxiter" option. This option can be used to
assure that the algorithm converges for functions with an ill-conditioned
Hessian.optimize.minimize(method="slsqp") can
opt into the new callback interface by accepting a single keyword argument
intermediate_result.BroydenFirst, *Jacobian, and Bounds classes now support
subscription, making them generic types, for compatibility with
scipy-stubs.scipy.signal improvementsscipy.signal.abcd_normalize gained more informative error messages and the
documentation was improved.scipy.signal.get_window now accepts the suffixes '_periodic' and
'_symmetric' to distinguish between periodic and symmetric windows
(overriding the fftbin parameter). This benefits the functions
coherence, csd, periodogram, welch, spectrogram,
stft, istft, resample, resample_poly, firwin,
firwin2, firwin_2d, check_COLA and check_NOLA, which utilize
get_window but do not expose the fftbin parameter.scipy.signal.hilbert2 gained the new keyword axes for specifying the
axes along which the two-dimensional analytic signal should be calculated.
Furthermore, the documentation of scipy.signal.hilbert and
scipy.signal.hilbert2 was significantly improved.ShortTimeFFT and LinearTimeInvariant classes now support
subscription, making them generic types, for compatibility with
scipy-stubs.scipy.sparse improvementscoo_array now supports indexing. This includes slices, arrays,
np.newaxis, Ellipsis, in 1D, 2D and the new nD. So COO format now
has full support for nD and COO now allows indexing without converting
formats.expand_dims,
swapaxes, permute_dims, and nD support for the kron function.scipy.sparse.dok_array now supports an update method which can be
used to update the sparse array using a dict, dict.items()-like iterable,
or another dok_array matrix. It performs additional validation that keys
are valid index tuples.scipy.sparse.dia_array.tocsr is approximately three times faster and
some unnecessary copy operations have been removed from sparse format
interconversions more broadly.scipy.sparse.linalg.funm_multiply_krylov, a restarted Krylov method
for evaluating y = f(tA) b.sparse.linalg, the LinearOperator, LaplacianNd, and SuperLU
classes now support subscription, making them generic types, for
compatibility with scipy-stubs.sparse.linalg the eigs and eigsh functions now accept a new
rng parameter.scipy.spatial improvementsThe spatial.transform module has gained an array API standard compatible
backend.
transform.Rotation and transform.RigidTransform have been extended
from 0D single values and 1D arrays to N-D arrays, with standard indexing and
broadcasting rules. Both now have the following additions:
shape property.shape argument to their identity() constructors, which should be
preferred over the existing num argument. This has also been added as an
argument for Rotation.random() (RigidTransform does not currently
have a random constructor).axis argument to their mean() functions.The resulting shapes for transform.Rotation.from_euler /
from_davenport have changed to make them consistent with broadcasting
rules. Angle inputs to Euler angles must now strictly match the number of
provided axes in the last dimension. The resulting Rotation has the shape
np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must
also match the number of axes in the last dimension. The resulting Rotation
has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).
Rotation.from_matrix has gained an assume_valid argument that allows for
performance improvements when users can guarantee valid matrix inputs.
from_matrix is now also faster in cases where a known orthogonal matrix
is used.
The scipy.spatial.geometric_slerp function can now extrapolate. When given a
value outside the range [0, 1], geometric_slerp() will continue with
the same rotation outside this range. For example, if spherically
interpolating with start being a point on the equator, and end
being a point at the north pole, then a value of t=-1 would give you a
point at the south pole.
Rotation.as_euler and Rotation.as_davenport methods have gained a
suppress_warnings parameter to enable suppression of gimbal lock warnings.
Rotation.__init__ has gained a new optional scalar_first parameter and
there is a new Rotation.__setitem__ method.
scipy.special improvementsbtdtria, btdtrib,
chdtriv, chndtr, chndtrix, chndtridf, chndtrinc, fdtr,
fdtrc, fdtri, gdtria, gdtrix, pdtrik, stdtr and
stdtrit.betainc, betaincc, betaincinv and
betainccinv are improved for extreme parameter ranges.scipy.stats improvementsscipy.stats.matrix_t has been added to represent the matrix t distribution.
It supports methods pdf (and logpdf) for computing the probability
density function and rvs for generating random variates.scipy.stats.Logistic was added for modeling random variables that follow a
logistic distribution.scipy.stats.quantile now accepts a weights argument to specify
frequency weights.scipy.stats.quantile is now faster on large arrays as it no longer uses
stable sort internally.scipy.stats.quantile supports three new values of the method argument,
'round_inward', 'round_outward', and 'round_neareast', for use in
the context of trimming and winsorizing data.scipy.stats.truncpareto now accepts negative values for the exponent shape
parameter, enabling use of truncpareto as a more general power law
distribution.scipy.stats.logser now provides a distribution-specific implementation of
the sf method, improving speed and accuracy.scipy.stats.ansari, scipy.stats.cramervonmises,
scipy.stats.cramervonmises_2samp, scipy.stats.epps_singleton_2samp,
scipy.stats.fligner, scipy.stats.friedmanchisquare, scipy.stats.kruskal,
scipy.stats.ks_1samp, scipy.stats.levene, and scipy.stats.mood.
Typically, this improves performance with multidimensional (batch) input.scipy.stats.anderson have been updated.scipy.stats.zipfian methods has been
improved.scipy.stats.Binomial methods logcdf and
logccdf have been improved in the tails.scipy.stats.trapezoid.fit has been improved.cdf, sf, isf, and ppf methods
of scipy.stats.binom and scipy.stats.nbinom has been improved.Covariance, Uniform, Normal, Binomial, Mixture,
rv_frozen, and multi_rv_frozen classes now support subscription,
making them generic types, for compatibility with scipy-stubs.multivariate_t and multivariate_normal distributions have gained
a new marginal method.yeojohnson_llf gained new parameters axis, nan_policy,
and keepdims, and now returns a numpy scalar where it would previously
return a 0D array.spearmanrho function is an array API compatible substitute for
spearmanr.median_abs_deviation function has gained a keepdims parameter.trim_mean function has gained new nan_policy and keepdims
parameters.scipy.cluster.hierarchy.is_isomorphic has gained support.scipy.interpolate.make_lsq_spline, scipy.interpolate.make_smoothing_spline,
scipy.interpolate.make_splrep, scipy.interpolate.make_splprep,
scipy.interpolate.generate_knots, and scipy.interpolate.make_interp_spline
have gained support.scipy.signal.bilinear, scipy.signal.iircomb, scipy.signal.iirdesign,
scipy.signal.iirfilter, scipy.signal.iirpeak, scipy.signal.iirnotch,
scipy.signal.gammatone, and scipy.signal.group_delay have gained support.scipy.signal.butter, scipy.signal.buttap, scipy.signal.buttord,
scipy.signal.cheby1, scipy.signal.cheb1ap, scipy.signal.cheb1ord,
scipy.signal.cheby2, scipy.signal.cheb2ap, scipy.signal.cheb2ord,
scipy.signal.bessel, scipy.signal.besselap, scipy.signal.ellip,
scipy.signal.ellipap, and scipy.signal.ellipord have gained support.scipy.signal.savgol_filter, scipy.signal.savgol_coeffs, and
scipy.signal.abcd_normalize have gained support.spatial.transform has gained support.scipy.integrate.qmc_quad, scipy.integrate.cumulative_simpson,
scipy.integrate.cumulative_trapezoid, and scipy.integrate.romb have
gained support.scipy.linalg.block_diag, scipy.linalg.fiedler, and
scipy.linalg.orthogonal_procrustes have gained support.scipy.interpolate.BSpline, scipy.interpolate.NdBSpline,
scipy.interpolate.RegularGridInterpolator, and
scipy.interpolate.RBFInterpolator gained support.scipy.stats.alexandergovern, scipy.stats.bootstrap,
scipy.stats.brunnermunzel, scipy.stats.chatterjeexi,
scipy.stats.cramervonmises, scipy.stats.cramervonmises_2samp,
scipy.stats.epps_singleton_2samp, scipy.stats.false_discovery_control,
scipy.stats.fligner, scipy.stats.friedmanchisquare, scipy.stats.iqr,
scipy.stats.kruskal, scipy.stats.ks_1samp, scipy.stats.levene,
scipy.stats.lmoment, scipy.stats.mannwhitneyu,
scipy.stats.median_abs_deviation, scipy.stats.mode, scipy.stats.mood,
scipy.stats.ansari,
scipy.stats.power, scipy.stats.permutation_test, scipy.stats.sigmaclip,
scipy.stats.wilcoxon, and scipy.stats.yeojohnson_llf.scipy.stats.pearsonr has gained support for JAX and Dask backends.scipy.stats.variation has gained support for the Dask backend.marray support was added for stats.gtstd, stats.directional_stats,
stats.bartlett, stats.variation, stats.pearsonr, and
stats.entropy.scipy.odr module is deprecated in v1.17.0 and will be completely
removed in v1.19.0. Users are suggested to use the odrpack package instead.scipy.sparse.diags and
scipy.sparse.diags_array will change in v1.19.0.scipy.linalg.hankel will no longer ravel multidimensional
inputs and instead will treat them as a batch.precenter argument of scipy.signal.lombscargle is deprecated and
will be removed in v1.19.0. Furthermore, some arguments will become keyword
only.scipy.stats.anderson, the tuple-unpacking behavior of the return object
and attributes critical_values, significance_level, and
fit_result are deprecated. Beginning in SciPy 1.19.0, these features will
no longer be available, and the object returned will have attributes
statistic and pvalue.scipy.stats.anderson_ksamp, the midrank parameter is deprecated
and the new variant parameter should be preferred. This also means that
the presence of the critical_values return array is deprecated.scipy.stats.find_repeats has been removed. Please use
numpy.unique/numpy.unique_counts instead.scipy.linalg functions for Toeplitz matrices no longer ravel n-d input
arguments; instead, multidimensional input is treated as a batch.seed and rand functions from scipy.linalg.interpolative have
been removed. Use the rng argument instead.scipy.spatial.distance.cosine and
scipy.spatial.distance.correlation now raise an error.scipy.signal.correlate, scipy.signal.convolve, scipy.signal.lfilter,
and scipy.signal.sosfilt.kulczynski1 and sokalmichener have been removed from
scipy.spatial.distance.kron has been removed from scipy.linalg. Please use numpy.kron.scipy.interpolate.interpnd.random_state and permutation arguments of
scipy.stats.ttest_ind have been removed.sph_harm, clpmn, lpn, and lpmn have been removed from
scipy.special.transform.Rotation.from_euler /
from_davenport have changed to make them consistent with broadcasting
rules. Angle inputs to Euler angles must now strictly match the number of
provided axes in the last dimension. The resulting Rotation has the shape
np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must
also match the number of axes in the last dimension. The resulting Rotation
has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).The version of the Boost Math library leveraged by SciPy has been
increased from 1.88.0 to 1.89.0.
On POSIX operating systems, SciPy will now use the 'forkserver'
multiprocessing context on Python 3.13 and older for workers=<an-int>
calls if the user hasn't configured a default method themselves. This follows
the default behavior on Python 3.14.
Initial support for 64-bit integer (ILP64) BLAS and LAPACK libraries has been
added. To enable it, build SciPy with -Duse-ilp64=true meson option, and make
sure to have a LAPACK library which exposes both LP64 and ILP64 symbols.
Currently supported LAPACK libraries are MKL, Apple Accelerate and OpenBLAS
through the scipy-openblas64 package. Note that:
get_{blas,lapack}_funcs functions:
scipy.linalg.lapack.get_lapack_funcs(..., use_ilp64="preferred") selects
the ILP64 variant if available and LP64 variant otherwise;cython_blas and cython_lapack modules always contain the LP64
routines for ABI compatibility.Please report any issues with ILP64 you encounter.
A total of 117 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.
The full issue and pull request lists, and the release asset hashes are available
in the associated README.txt file.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.17.0 is not released yet!
SciPy 1.17.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.17.x branch, and on adding new features on the main branch.
This release requires Python 3.11-3.14 and NumPy 1.26.4 or greater.
scipy.sparse, coo_array now has full support for indexing across
dimensions without needing to convert between sparse formats. ARPACK
and PROPACK rewrites from Fortran77 to C now empower the use of external
pseudorandom number generators.scipy.spatial, transform.Rotation and transform.RigidTransform
have been extended to support N-D arrays. geometric_slerp now has support
for extrapolation.scipy.stats has gained the matrix t and logistic distributions and many
performance and accuracy improvements.scipy.integrate improvementsdopri5, dopri853, LSODA, vode, and
zvode have been ported from Fortran77 to C.scipy.integrate.quad now has a fast path for returning 0 when the integration
interval is empty.scipy.cluster improvementsscipy.cluster.hierarchy.is_isomorphic has improved performance and array
API support.scipy.interpolate improvementsbc_type argument has been added to scipy.interpolate.make_splrep
and scipy.interpolate.make_splprep to control the boundary conditions for
spline fitting. Allowed values are "not-a-knot" (default) and
"periodic".derivative method has been added to the
scipy.interpolate.NdBSpline class, to construct a new spline representing a
partial derivative of the given spline. This method is similar to the
BSpline.derivative method of 1-D spline objects."cubic" and "quintic" modes of
scipy.interpolate.RegularGridInterpolator has been improved.scipy.interpolate.AAA has been improved.scipy.interpolate.FloaterHormannInterpolator added support for
multidimensional, batched inputs and gained a new axis parameter to
select the interpolation axis.scipy.linalg improvementsscipy.linalg.inv routine has been improved:
assume_a keyword
allows to bypass the structure detection if the structure is known. For
batched inputs, the detection is run for each 2D slice, unless an explicit
value for assume_a is provided (in which case, the structure is
assumed to be the same for all 2-D slices of the batch);lower={True,False} keyword argument has been added to help
select the upper or lower triangle of the input matrix for symmetric
inputs; refer to the docstring of scipy.linalg.inv for details;LinAlgWarning if it detects an ill-conditioned
input;scipy.linalg.fiedler has gained native support for batched inputs.
performance has improved for scipy.linalg.solve with batched inputs
for certain matrix structures.
scipy.optimize improvementsoptimize.minimize(method="trust-exact") now accepts a
solver-specific "subproblem_maxiter" option. This option can be used to
assure that the algorithm converges for functions with an ill-conditioned
Hessian.optimize.minimize(method="slsqp") can
opt into the new callback interface by accepting a single keyword argument
intermediate_result.scipy.signal improvementsscipy.signal.abcd_normalize gained more informative error messages and the
documentation was improved.scipy.signal.get_window now accepts the suffixes '_periodic' and
'_symmetric' to distinguish between periodic and symmetric windows
(overriding the fftbin parameter). This benefits the functions
coherence, csd, periodogram, welch, spectrogram,
stft, istft, resample, resample_poly, firwin,
firwin2, firwin_2d, check_COLA and check_NOLA, which utilize
get_window but do not expose the fftbin parameter.scipy.signal.hilbert2 gained the new keyword axes for specifying the
axes along which the two-dimensional analytic signal should be calculated.
Furthermore, the documentation of scipy.signal.hilbert and
scipy.signal.hilbert2 was significantly improved.scipy.sparse improvementscoo_array now supports indexing. This includes slices, arrays,
np.newaxis, Ellipsis, in 1D, 2D and the new nD. So COO format now
has full support for nD and COO now allows indexing without converting
formats.expand_dims,
swapaxes, permute_dims, and nD support for the kron function.scipy.sparse.dok_array now supports an update method which can be
used to update the sparse array using a dict, dict.items()-like iterable,
or another dok_array matrix. It performs additional validation that keys
are valid index tuples.scipy.sparse.dia_array.tocsr is approximately three times faster and
some unneccesary copy operations have been removed from sparse format
interconversions more broadly.scipy.sparse.linalg.funm_multiply_krylov, a restarted Krylov method
for evaluating y = f(tA) b.scipy.spatial improvementsThe spatial.transform module has gained an array API standard compatible
backend.
transform.Rotation and transform.RigidTransform have been extended
from 0D single values and 1D arrays to N-D arrays, with standard indexing and
broadcasting rules. Both now have the following additions:
shape property.shape argument to their identity() constructors, which should be
preferred over the existing num argument. This has also been added as an
argument for Rotation.random() (RigidTransform does not currently
have a random constructor).axis argument to their mean() functions.The resulting shapes for transform.Rotation.from_euler /
from_davenport have changed to make them consistent with broadcasting
rules. Angle inputs to Euler angles must now strictly match the number of
provided axes in the last dimension. The resulting Rotation has the shape
np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must
also match the number of axes in the last dimension. The resulting Rotation
has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).
Rotation.from_matrix has gained an assume_valid argument that allows for
performance improvements when users can guarantee valid matrix inputs.
from_matrix is now also faster in cases where a known orthogonal matrix
is used.
The scipy.spatial.geometric_slerp function can now extrapolate. When given a
value outside the range [0, 1], geometric_slerp() will continue with
the same rotation outside this range. For example, if spherically
interpolating with start being a point on the equator, and end
being a point at the north pole, then a value of t=-1 would give you a
point at the south pole.
Rotation.as_euler and Rotation.as_davenport methods have gained a
suppress_warnings parameter to enable suppression of gimbal lock warnings.
scipy.special improvementsbtdtria, btdtrib,
chdtriv, chndtr, chndtrix, chndtridf, chndtrinc, fdtr,
fdtrc, fdtri, gdtria, gdtrix, pdtrik, stdtr and
stdtrit.betainc, betaincc, betaincinv and
betainccinv are improved for extreme parameter ranges.scipy.stats improvementsscipy.stats.matrix_t has been added to represent the matrix t distribution.
It supports methods pdf (and logpdf) for computing the probability
density function and rvs for generating random variates.scipy.stats.Logistic was added for modeling random variables that follow a
logistic distribution.scipy.stats.quantile now accepts a weights argument to specify
frequency weights.scipy.stats.quantile is now faster on large arrays as it no longer uses
stable sort internally.scipy.stats.quantile supports three new values of the method argument,
'round_inward', 'round_outward', and 'round_neareast', for use in
the context of trimming and winsorizing data.scipy.stats.truncpareto now accepts negative values for the exponent shape
parameter, enabling use of truncpareto as a more general power law
distribution.scipy.stats.logser now provides a distribution-specific implementation of
the sf method, improving speed and accuracy.scipy.stats.ansari, scipy.stats.cramervonmises,
scipy.stats.cramervonmises_2samp, scipy.stats.epps_singleton_2samp,
scipy.stats.fligner, scipy.stats.friedmanchisquare, scipy.stats.kruskal,
scipy.stats.ks_1samp, scipy.stats.levene, and scipy.stats.mood.
Typically, this improves performance with multidimensional (batch) input.scipy.stats.anderson have been updated.scipy.stats.zipfian methods has been
improved.scipy.stats.Binomial methods logcdf and
logccdf have been improved in the tails.scipy.stats.trapezoid.fit has been improved.cdf, sf, isf, and ppf methods
of scipy.stats.binom and scipy.stats.nbinom has been improved.scipy.cluster.hierarchy.is_isomorphic has gained support.scipy.interpolate.make_lsq_spline, scipy.interpolate.make_smoothing_spline,
scipy.interpolate.make_splrep, scipy.interpolate.make_splprep,
scipy.interpolate.generate_knots, and scipy.interpolate.make_interp_spline
have gained support.scipy.signal.bilinear, scipy.signal.iircomb, scipy.signal.iirdesign,
scipy.signal.iirfilter, scipy.signal.iirpeak, scipy.signal.iirnotch,
scipy.signal.gammatone, and scipy.signal.group_delay have gained support.scipy.signal.butter, scipy.signal.buttap, scipy.signal.buttord,
scipy.signal.cheby1, scipy.signal.cheb1ap, scipy.signal.cheb1ord,
scipy.signal.cheby2, scipy.signal.cheb2ap, scipy.signal.cheb2ord,
scipy.signal.bessel, scipy.signal.besselap, scipy.signal.ellip,
scipy.signal.ellipap, and scipy.signal.ellipord have gained support.scipy.signal.savgol_filter, scipy.signal.savgol_coeffs, and
scipy.signal.abcd_normalize have gained support.spatial.transform has gained support.scipy.integrate.qmc_quad, scipy.integrate.cumulative_simpson,
scipy.integrate.cumulative_trapezoid, and scipy.integrate.romb have
gained support.scipy.linalg.block_diag, scipy.linalg.fiedler, and
scipy.linalg.orthogonal_procrustes have gained support.scipy.interpolate.BSpline, scipy.interpolate.NdBSpline,
scipy.interpolate.RegularGridInterpolator, and
scipy.interpolate.RBFInterpolator gained support.scipy.stats.alexandergovern, scipy.stats.bootstrap,
scipy.stats.brunnermunzel, scipy.stats.chatterjeexi,
scipy.stats.cramervonmises, scipy.stats.cramervonmises_2samp,
scipy.stats.epps_singleton_2samp, scipy.stats.false_discovery_control,
scipy.stats.fligner, scipy.stats.friedmanchisquare, scipy.stats.iqr,
scipy.stats.kruskal, scipy.stats.ks_1samp, scipy.stats.levene,
scipy.stats.lmoment, scipy.stats.mannwhitneyu,
scipy.stats.median_abs_deviation, scipy.stats.mode, scipy.stats.mood,
scipy.stats.ansari,
scipy.stats.power, scipy.stats.permutation_test, scipy.stats.sigmaclip,
scipy.stats.wilcoxon, and scipy.stats.yeojohnson_llf.scipy.stats.pearsonr has gained support for JAX and Dask backends.scipy.stats.variation has gained support for the Dask backend.marray support was added for stats.gtstd, stats.directional_stats,
stats.bartlett, stats.variation, stats.pearsonr, and
stats.entropy.scipy.odr module is deprecated in v1.17.0 and will be completely
removed in v1.19.0. Users are suggested to use the odrpack package instead.scipy.sparse.diags and
scipy.sparse.diags_array will change in v1.19.0.scipy.linalg.hankel will no longer ravel multidimensional
inputs and instead will treat them as a batch.precenter argument of scipy.signal.lombscargle is deprecated and
will be removed in v1.19.0. Furthermore, some arguments will become keyword
only.scipy.stats.find_repeats has been removed. Please use
numpy.unique/numpy.unique_counts instead.scipy.linalg functions for Toeplitz matrices no longer ravel n-d input
arguments; instead, multidimensional input is treated as a batch.seed and rand functions from scipy.linalg.interpolative have
been removed. Use the rng argument instead.scipy.spatial.distance.cosine and
scipy.spatial.distance.correlation now raise an error.scipy.signal.correlate, scipy.signal.convolve, scipy.signal.lfilter,
and scipy.signal.sosfilt.kulczynski1 and sokalmichener have been removed from
scipy.spatial.distance.kron has been removed from scipy.linalg. Please use numpy.kron.scipy.interpolate.interpnd.random_state and permutation arguments of
scipy.stats.ttest_ind have been removed.sph_harm, clpmn, lpn, and lpmn have been removed from
scipy.special.transform.Rotation.from_euler /
from_davenport have changed to make them consistent with broadcasting
rules. Angle inputs to Euler angles must now strictly match the number of
provided axes in the last dimension. The resulting Rotation has the shape
np.atleast_1d(angles).shape[:-1]. Angle inputs to Davenport angles must
also match the number of axes in the last dimension. The resulting Rotation
has the shape np.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).The version of the Boost Math library leveraged by SciPy has been
increased from 1.88.0 to 1.89.0.
On POSIX operating systems, SciPy will now use the 'forkserver'
multiprocessing context on Python 3.13 and older for workers=<an-int>
calls if the user hasn't configured a default method themselves. This follows
the default behavior on Python 3.14.
Initial support for 64-bit integer (ILP64) BLAS and LAPACK libraries has been
added. To enable it, build SciPy with -Duse-ilp64=true meson option, and make
sure to have a LAPACK library which exposes both LP64 and ILP64 symbols.
Currently supported LAPACK libraries are MKL, Apple Accelerate and OpenBLAS
through the scipy-openblas64 package. Note that:
get_{blas,lapack}_funcs functions:
scipy.linalg.lapack.get_lapack_funcs(..., use_ilp64="preferred") selects
the ILP64 variant if available and LP64 variant otherwise;cython_blas and cython_lapack modules always contain the LP64
routines for ABI compatibility.Please report any issues with ILP64 you encounter.
A total of 117 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.
The full issue and pull request lists, and the release asset hashes are available
in the associated README.txt file.
SciPy 1.16.3 is a bug-fix release with no new features compared to 1.16.2.
SciPy 1.16.3 is a bug-fix release with no new features compared to 1.16.2.
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.
The full issue and pull request lists, and the release asset hashes are available
in the associated README.txt file.
SciPy 1.16.2 is a bug-fix release with no new features compared to 1.16.1. This is the first stable release of SciPy to provide Windows on ARM wheels
SciPy 1.16.2 is a bug-fix release with no new features
compared to 1.16.1. This is the first stable release of
SciPy to provide Windows on ARM wheels on PyPI.
A total of 12 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.
The full issue and pull request lists, and the release asset hashes are available
in the associated README.txt file.
SciPy 1.16.1 is a bug-fix release that adds support for Python 3.14.0rc1, including PyPI wheels.
SciPy 1.16.1 is a bug-fix release that adds support for Python 3.14.0rc1,
including PyPI wheels.
A total of 12 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.
The full issue and pull request lists, and the release asset hashes are available
in the associated README.txt file.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
SciPy 1.16.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.16.x branch, and on adding new features on the main branch.
This release requires Python 3.11-3.13 and NumPy 1.25.2 or greater.
scipy.signal, and additional support in scipy.stats and
scipy.special. Improved support for JAX and Dask backends has been added,
with notable support in scipy.cluster.hierarchy, many functions in
scipy.special, and many of the trimmed statistics functions.scipy.optimize now uses the new Python implementation from the
PRIMA package for COBYLA. The PRIMA implementation fixes many bugs
in the old Fortran 77 implementation with a better performance on average.scipy.sparse.coo_array now supports n-D arrays with reshaping, arithmetic and
reduction operations like sum/mean/min/max. No n-D indexing or
scipy.sparse.random_array support yet.scipy.linalg namespace that accept array
arguments now support N-dimensional arrays to be processed as a batch.scipy.signal functions, scipy.signal.firwin_2d and
scipy.signal.closest_STFT_dual_window, for creation of a 2-D FIR filter and
scipy.signal.ShortTimeFFT dual window calculation, respectively.scipy.spatial.transform.RigidTransform, provides functionality
to convert between different representations of rigid transforms in 3-D
space.scipy.ndimage.vectorized_filter for generic filters that
take advantage of a vectorized Python callable was added.scipy.io improvementsscipy.io.savemat now provides informative warnings for invalid field names.scipy.io.mmread now provides a clearer error message when provided with
a source file path that does not exist.scipy.io.wavfile.read can now read non-seekable files.scipy.integrate improvementsscipy.integrate.tanhsinh was improved.scipy.interpolate improvementsscipy.interpolate.make_smoothing_spline.scipy.linalg improvementsscipy.linalg namespace that accept array
arguments now support N-dimensional arrays to be processed as a batch.
See linalg_batch for details.scipy.linalg.sqrtm is rewritten in C and its performance is improved. It
also tries harder to return real-valued results for real-valued inputs if
possible. See the function docstring for more details. In this version the
input argument disp and the optional output argument errest are
deprecated and will be removed four versions later. Similarly, after
changing the underlying algorithm to recursion, the blocksize keyword
argument has no effect and will be removed two versions later.?stevd, ?langb, ?sytri, ?hetri and
?gbcon were added to scipy.linalg.lapack.scipy.linalg.eigh_tridiagonal was improved.scipy.linalg.solve can now estimate the reciprocal condition number and
the matrix norm calculation is more efficient.scipy.ndimage improvementsscipy.ndimage.vectorized_filter for generic filters that
take advantage of a vectorized Python callable was added.scipy.ndimage.rotate has improved performance, especially on ARM platforms.scipy.optimize improvementsPRIMApackage.
The PRIMA implementation fixes many bugs
in the old Fortran 77 implementation. In addition, it results in fewer function evaluations on average
but it depends on the problem and for some
problems it can result in more function evaluations or a less optimal
result. For those cases the user can try modifying the initial and final
trust region radii given by rhobeg and tol respectively. A larger
rhobeg can help the algorithm take bigger steps initially, while a
smaller tol can help it continue and find a better solution.
For more information, see the PRIMA documentation.scipy.optimize.minimize methods, and the
scipy.optimize.least_squares function, have been given a workers
keyword. This allows parallelization of some calculations via a map-like
callable, such as multiprocessing.Pool. These parallelization
opportunities typically occur during numerical differentiation. This can
greatly speed up minimization when the objective function is expensive to
calculate.lm method of scipy.optimize.least_squares can now accept
3-point and cs for the jac keyword.multiplier
keyword of the returned scipy.optimize.OptimizeResult object.scipy.optimize.root now warns for invalid inner parameters when using the
newton_krylov methodmethod='L-BFGS-B' now has
a faster hess_inv.todense() implementation. Time complexity has improved
from cubic to quadratic.scipy.optimize.least_squares has a new callback argument that is applicable
to the trf and dogbox methods. callback may be used to track
optimization results at each step or to provide custom conditions for
stopping.scipy.signal improvementsscipy.signal.firwin_2d for the creation of a 2-D FIR Filter
using the 1-D window method was added.scipy.signal.cspline1d_eval and scipy.signal.qspline1d_eval now provide
an informative error on empty input rather than hitting the recursion limit.scipy.signal.closest_STFT_dual_window to calculate the
scipy.signal.ShortTimeFFT dual window of a given window closest to a
desired dual window.scipy.signal.ShortTimeFFT.from_win_equals_dual to
create a scipy.signal.ShortTimeFFT instance where the window and its dual
are equal up to a scaling factor. It allows to create short-time Fourier
transforms which are unitary mappings.scipy.signal.convolve2d was improved.scipy.sparse improvementsscipy.sparse.coo_array now supports n-D arrays using binary and reduction
operations.scipy.sparse.csgraph.dijkstra shortest_path is more efficient.scipy.sparse.csgraph.yen has performance improvements.sparse.csgraph and sparse.linalg was
added.scipy.spatial improvementsscipy.spatial.transform.RigidTransform, provides functionality
to convert between different representations of rigid transforms in 3-D
space, its application to vectors and transform composition.
It follows the same design approach as scipy.spatial.transform.Rotation.scipy.spatial.transform.Rotation now has an appropriate __repr__ method,
and improved performance for its scipy.spatial.transform.Rotation.apply
method.scipy.stats improvementsscipy.stats.quantile, an array API compatible function for
quantile estimation, was added.scipy.stats.make_distribution was extended to work with existing discrete
distributions and to facilitate the creation of custom distributions in the
new random variable infrastructure.scipy.stats.Binomial, was added.equal_var keyword was added to scipy.stats.tukey_hsd (enables the
Games-Howell test) and scipy.stats.f_oneway (enables Welch ANOVA).scipy.stats.gennorm was improved.scipy.stats.mode implementation was vectorized, for faster batch
calculation.axis, nan_policy, and keepdims keywords was added to
scipy.stats.power_divergence, scipy.stats.chisquare,
scipy.stats.pointbiserialr, scipy.stats.kendalltau,
scipy.stats.weightedtau, scipy.stats.theilslopes,
scipy.stats.siegelslopes, scipy.stats.boxcox_llf, and
scipy.stats.linregress.keepdims and nan_policy keywords was added to
scipy.stats.gstd.scipy.stats.special_ortho_group and scipy.stats.pearsonr
was improved.rng keyword argument was added to the logcdf and
cdf methods of multivariate_normal_gen and multivariate_normal_frozen.Experimental support for array libraries other than NumPy has been added to
multiple submodules in recent versions of SciPy. Please consider testing
these features by setting the environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, CuPy or Dask arrays as array arguments.
Many functions in scipy.stats, scipy.special, scipy.optimize, and
scipy.constants now provide tables documenting compatible array and device
types as well as support for lazy arrays and JIT compilation. New features with
support and old features with support added for SciPy 1.16.0 include:
scipy.signal functionalityscipy.ndimage.vectorized_filterscipy.special.stdtritscipy.special.softmaxscipy.special.log_softmaxscipy.stats.quantilescipy.stats.gstdscipy.stats.rankdataFeatures with extended array API support (generally, improved support for JAX and Dask) in SciPy 1.16.0 include:
scipy.cluster.hierarchy functionsscipy.specialscipy.statsSciPy now has a CI job that exercises GPU (CUDA) support, and as a result using PyTorch, CuPy or JAX arrays on GPU with SciPy is now more reliable.
atol argument of scipy.optimize.nnls is deprecated and will
be removed in SciPy 1.18.0.disp argument of scipy.linalg.signm, scipy.linalg.logm, and
scipy.linalg.sqrtm will be removed in SciPy 1.18.0.scipy.stats.multinomial now emits a FutureWarning if the rows of p
do not sum to 1.0. This condition will produce NaNs beginning in SciPy
1.18.0.disp and iprint arguments of the l-bfgs-b solver of scipy.optimize
have been deprecated, and will be removed in SciPy 1.18.0.scipy.sparse.conjtransp has been removed. Use .T.conj() instead.quadrature='trapz' option has been removed from
scipy.integrate.quad_vec, and scipy.stats.trapz has been removed. Use
trapezoid in both instances instead.scipy.special.comb and scipy.special.perm now raise when exact=True
and arguments are non-integral.x has been removed from scipy.stats.linregress. The data
must be specified separately as x and y.scipy.stats.power_divergence and scipy.stats.chisquare.scipy.sparse.base, scipy.interpolate.dfitpack) were cleaned
up. They were previously already emitting deprecation warnings.scipy.linalg functions for solving a linear system (e.g.
scipy.linalg.solve) documented that the RHS argument must be either 1-D or
2-D but did not always raise an error when the RHS argument had more the
two dimensions. Now, many-dimensional right hand sides are treated according
to the rules specified in linalg_batch.scipy.stats.bootstrap now explicitly broadcasts elements of data to the
same shape (ignoring axis) before performing the calculation.from scipy.signal import *,
but may still be imported directly, as detailed at https://github.com/scipy/scipy-stubs/pull/549.Cython>=3.1.0, SciPy now uses the new cython --generate-shared
functionality, which reduces the total size of SciPy's wheels and on-disk
installations significantly.sf_error_state was removed from scipy.special.-Duse-system-libraries has been added. It allows
opting in to using system libraries instead of using vendored sources.
Currently Boost.Math and Qhull are supported as system build
dependencies.scipy-stubs (v1.16.0.0) is
available at https://github.com/scipy/scipy-stubs/releases/tag/v1.16.0.0scipy._lib on scipy.sparse was removed,
which reduces the import time of a number of other SciPy submodules.scipy.special were fixed, and pytest-run-parallel is now used
in a CI job to guard against regressions.spin as a developer
CLI was added, including support for editable installs. The SciPy-specific
python dev.py CLI will be removed in the next release cycle in favor of
spin.scipy.special was moved to the new
header-only xsf library. That library was
included back in the SciPy source tree as a git submodule.namedtuple-like bunch objects returned by some SciPy functions
now have improved compatibility with the polars library.rvs method of scipy.stats.wrapcauchy is now mapped to
the unit circle between 0 and 2 * pi.lm method of scipy.optimize.least_squares now has a different behavior
for the maximum number of function evaluations, max_nfev. The default for
the lm method is changed to 100 * n, for both a callable and a
numerically estimated jacobian. This limit on function evaluations excludes
those used for any numerical estimation of the Jacobian. Previously the
default when using an estimated jacobian was 100 * n * (n + 1), because
the method included evaluations used in the estimation. In addition, for the
lm method the number of function calls used in Jacobian approximation
is no longer included in OptimizeResult.nfev. This brings the behavior
of lm, trf, and dogbox into line.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.
Complete issue list, PR list, and release asset hashes are available in the associated README.txt.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.16.0 is not released yet!
SciPy 1.16.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.16.x branch, and on adding new features on the main branch.
This release requires Python 3.11-3.13 and NumPy 1.25.2 or greater.
Improved experimental support for the Python array API standard, including new support in scipy.signal, and additional support in scipy.stats and scipy.special. Improved support for JAX and Dask backends has been added, with notable support in scipy.cluster.hierarchy, many functions in scipy.special, and many of the trimmed statistics functions.
scipy.optimize now uses the new Python implementation from the [PRIMA](https://www.libprima.net) package for COBYLA. The PRIMA implementation [fixes many bugs](https://github.com/libprima/prima#bug-fixes) in the old Fortran 77 implementation with [a better performance on average](https://github.com/libprima/prima#improvements).
scipy.sparse.coo_array now supports n-D arrays with reshaping, arithmetic and reduction operations like sum/mean/min/max. No n-D indexing or scipy.sparse.random_array support yet.
Updated guide and tools for migration from sparse matrices to sparse arrays.
Nearly all functions in the scipy.linalg namespace that accept array arguments now support N-dimensional arrays to be processed as a batch.
Two new scipy.signal functions, scipy.signal.firwin_2d and scipy.signal.closest_STFT_dual_window, for creation of a 2-D FIR filter and scipy.signal.ShortTimeFFT dual window calculation, respectively.
A new class, scipy.spatial.transform.RigidTransform, provides functionality to convert between different representations of rigid transforms in 3-D space.
scipy.io.savemat now provides informative warnings for invalid field names.
scipy.io.mmread now provides a clearer error message when provided with a source file path that does not exist.
scipy.io.wavfile.read can now read non-seekable files.
The error estimate of scipy.integrate.tanhsinh was improved.
Batch support was added to scipy.interpolate.make_smoothing_spline.
Nearly all functions in the scipy.linalg namespace that accept array arguments now support N-dimensional arrays to be processed as a batch. See linalg_batch for details.
scipy.linalg.sqrtm is rewritten in C and its performance is improved. It also tries harder to return real-valued results for real-valued inputs if possible. See the function docstring for more details. In this version the input argument disp and the optional output argument errest are deprecated and will be removed four versions later. Similarly, after changing the underlying algorithm to recursion, the blocksize keyword argument has no effect and will be removed two versions later.
Wrappers for ?stevd, ?langb, ?sytri, ?hetri and ?gbcon were added to scipy.linalg.lapack.
The default driver of scipy.linalg.eigh_tridiagonal was improved.
scipy.linalg.solve can now estimate the reciprocal condition number and the matrix norm calculation is more efficient.
A new function scipy.ndimage.vectorized_filter for generic filters that take advantage of a vectorized Python callable was added.
scipy.ndimage.rotate has improved performance, especially on ARM platforms.
COBYLA was updated to use the new Python implementation from the [PRIMA](https://www.libprima.net) package. The PRIMA implementation [fixes many bugs](https://github.com/libprima/prima#bug-fixes) in the old Fortran 77 implementation. In addition, it results in [fewer function evaluations on average](https://github.com/libprima/prima#improvements), but it depends on the problem and for some problems it can result in more function evaluations or a less optimal result. For those cases the user can try modifying the initial and final trust region radii given by rhobeg and tol respectively. A larger rhobeg can help the algorithm take bigger steps initially, while a smaller tol can help it continue and find a better solution. For more information, see the [PRIMA documentation](https://www.libprima.net).
Several of the scipy.optimize.minimize methods, and the scipy.optimize.least_squares function, have been given a workers keyword. This allows parallelization of some calculations via a map-like callable, such as multiprocessing.Pool. These parallelization opportunities typically occur during numerical differentiation. This can greatly speed up minimization when the objective function is expensive to calculate.
The lm method of scipy.optimize.least_squares can now accept 3-point and cs for the jac keyword.
The SLSQP Fortran 77 code was ported to C. When this method is used now the constraint multipliers are exposed to the user through the multiplier keyword of the returned scipy.optimize.OptimizeResult object.
NNLS code has been corrected and rewritten in C to address the performance regression introduced in 1.15.x
scipy.optimize.root now warns for invalid inner parameters when using the newton_krylov method
The return value of minimization with method='L-BFGS-B' now has a faster hess_inv.todense() implementation. Time complexity has improved from cubic to quadratic.
scipy.optimize.least_squares has a new callback argument that is applicable to the trf and dogbox methods. callback may be used to track optimization results at each step or to provide custom conditions for stopping.
A new function scipy.signal.firwin_2d for the creation of a 2-D FIR Filter using the 1-D window method was added.
scipy.signal.cspline1d_eval and scipy.signal.qspline1d_eval now provide an informative error on empty input rather than hitting the recursion limit.
A new function scipy.signal.closest_STFT_dual_window to calculate the scipy.signal.ShortTimeFFT dual window of a given window closest to a desired dual window.
A new classmethod scipy.signal.ShortTimeFFT.from_win_equals_dual to create a scipy.signal.ShortTimeFFT instance where the window and its dual are equal up to a scaling factor. It allows to create short-time Fourier transforms which are unitary mappings.
The performance of scipy.signal.convolve2d was improved.
scipy.sparse.coo_array now supports n-D arrays using binary and reduction operations.
Faster operations between two DIA arrays/matrices for: add, sub, multiply, matmul.
scipy.sparse.csgraph.dijkstra shortest_path is more efficient.
scipy.sparse.csgraph.yen has performance improvements.
Support for lazy loading of sparse.csgraph and sparse.linalg was added.
A new class, scipy.spatial.transform.RigidTransform, provides functionality to convert between different representations of rigid transforms in 3-D space, its application to vectors and transform composition. It follows the same design approach as scipy.spatial.transform.Rotation.
scipy.spatial.transform.Rotation now has an appropriate __repr__ method, and improved performance for its scipy.spatial.transform.Rotation.apply method.
A new function scipy.stats.quantile, an array API compatible function for quantile estimation, was added.
scipy.stats.make_distribution was extended to work with existing discrete distributions and to facilitate the creation of custom distributions in the new random variable infrastructure.
A new distribution, scipy.stats.Binomial, was added.
An equal_var keyword was added to scipy.stats.tukey_hsd (enables the Games-Howell test) and scipy.stats.f_oneway (enables Welch ANOVA).
The moment calculation for scipy.stats.gennorm was improved.
The scipy.stats.mode implementation was vectorized, for faster batch calculation.
Support for axis, nan_policy, and keepdims keywords was added to scipy.stats.power_divergence, scipy.stats.chisquare, scipy.stats.pointbiserialr, scipy.stats.kendalltau, scipy.stats.weightedtau, scipy.stats.theilslopes, scipy.stats.siegelslopes, scipy.stats.boxcox_llf, and scipy.stats.linregress.
Support for keepdims and nan_policy keywords was added to scipy.stats.gstd.
The performance of scipy.stats.special_ortho_group and scipy.stats.pearsonr was improved.
Support for an rng keyword argument was added to the logcdf and cdf methods of multivariate_normal_gen and multivariate_normal_frozen.
Experimental support for array libraries other than NumPy has been added to multiple submodules in recent versions of SciPy. Please consider testing these features by setting the environment variable SCIPY_ARRAY_API=1 and providing PyTorch, JAX, CuPy or Dask arrays as array arguments.
Many functions in scipy.stats, scipy.special, scipy.optimize, and scipy.constants now provide tables documenting compatible array and device types as well as support for lazy arrays and JIT compilation. New features with support and old features with support added for SciPy 1.16.0 include:
Most of the scipy.signal functionality
scipy.ndimage.vectorized_filter
scipy.special.stdtrit
scipy.special.softmax
scipy.special.log_softmax
scipy.stats.quantile
scipy.stats.gstd
scipy.stats.rankdata
Features with extended array API support (generally, improved support for JAX and Dask) in SciPy 1.16.0 include:
many of the scipy.cluster.hierarchy functions
many functions in scipy.special
many of the trimmed statistics functions in scipy.stats
SciPy now has a CI job that exercises GPU (CUDA) support, and as a result using PyTorch, CuPy or JAX arrays on GPU with SciPy is now more reliable.
The unused atol argument of scipy.optimize.nnls is deprecated and will be removed in SciPy 1.18.0.
The disp argument of scipy.linalg.signm, scipy.linalg.logm, and scipy.linalg.sqrtm will be removed in SciPy 1.18.0.
scipy.stats.multinomial now emits a FutureWarning if the rows of p do not sum to 1.0. This condition will produce NaNs beginning in SciPy 1.18.0.
scipy.sparse.conjtransp has been removed. Use .T.conj() instead.
The quadrature='trapz' option has been removed from scipy.integrate.quad_vec, and scipy.stats.trapz has been removed. Use trapezoid in both instances instead.
scipy.special.comb and scipy.special.perm now raise when exact=True and arguments are non-integral.
Support for inference of the two sets of measurements from the single argument x has been removed from scipy.stats.linregress. The data must be specified separately as x and y.
Support for NumPy masked arrays has been removed from scipy.stats.power_divergence and scipy.stats.chisquare.
A significant number of functions from non-public namespaces (e.g., scipy.sparse.base, scipy.interpolate.dfitpack) were cleaned up. They were previously already emitting deprecation warnings.
Several of the scipy.linalg functions for solving a linear system (e.g. scipy.linalg.solve) documented that the RHS argument must be either 1-D or 2-D but did not always raise an error when the RHS argument had more the two dimensions. Now, many-dimensional right hand sides are treated according to the rules specified in linalg_batch.
scipy.stats.bootstrap now explicitly broadcasts elements of data to the same shape (ignoring axis) before performing the calculation.
Several submodule names are no longer available via from scipy.signal import *, but may still be imported directly, as detailed at https://github.com/scipy/scipy-stubs/pull/549.
The minimum supported version of Clang was bumped from 12.0 to 15.0.
The lowest supported macOS version for wheels on PyPI is now 10.14 instead of 10.13.
The sdist contents were optimized, resulting in a size reduction of about 50%, from 60 MB to 30 MB.
For Cython>=3.1.0, SciPy now uses the new cython --generate-shared functionality, which reduces the total size of SciPy's wheels and on-disk installations significantly.
SciPy no longer contains an internal shared library that requires RPATH support, after sf_error_state was removed from scipy.special.
A new build option -Duse-system-libraries has been added. It allows opting in to using system libraries instead of using vendored sources. Currently Boost.Math and Qhull are supported as system build dependencies.
The internal dependency of scipy._lib on scipy.sparse was removed, which reduces the import time of a number of other SciPy submodules.
Support for free-threaded CPython was improved: the last known thread-safety issues in scipy.special were fixed, and pytest-run-parallel is now used in a CI job to guard against regressions.
Support for [spin](https://github.com/scientific-python/spin) as a developer CLI was added, including support for editable installs. The SciPy-specific python dev.py CLI will be removed in the next release cycle in favor of spin.
The vendored Qhull library was upgraded from version 2019.1 to 2020.2.
A large amount of the C++ code in scipy.special was moved to the new header-only [xsf](https://github.com/scipy/xsf) library. That library was included back in the SciPy source tree as a git submodule.
The namedtuple-like bunch objects returned by some SciPy functions now have improved compatibility with the polars library.
The output of the rvs method of scipy.stats.wrapcauchy is now mapped to the unit circle between 0 and 2 * pi.
The lm method of scipy.optimize.least_squares now has a different behavior for the maximum number of function evaluations, max_nfev. The default for the lm method is changed to 100 * n, for both a callable and a numerically estimated jacobian. This limit on function evaluations excludes those used for any numerical estimation of the Jacobian. Previously the default when using an estimated jacobian was 100 * n * (n + 1), because the method included evaluations used in the estimation. In addition, for the lm method the number of function calls used in Jacobian approximation is no longer included in OptimizeResult.nfev. This brings the behavior of lm, trf, and dogbox into line.
Name (commits)
h-vetinari (4)
aiudirog (1) +
Anton Akhmerov (2)
Thorsten Alteholz (1) +
Gabriel Augusto (1) +
Backfisch263 (1) +
Nickolai Belakovski (5)
Peter Bell (1)
Benoît W. (1) +
Evandro Bernardes (1)
Gauthier Berthomieu (1) +
Maxwell Bileschi (1) +
Sam Birch (1) +
Florian Bourgey (3) +
Charles Bousseau (2) +
Richard Strong Bowen (2) +
Jake Bowhay (126)
Matthew Brett (1)
Dietrich Brunn (53)
Evgeni Burovski (252)
Christine P. Chai (12) +
Gayatri Chakkithara (1) +
Saransh Chopra (2) +
Omer Cohen (1) +
Lucas Colley (91)
Yahya Darman (3) +
Benjamin Eisele (1) +
Donnie Erb (1)
Sagi Ezri (58) +
Alexander Fabisch (2) +
Matthew H Flamm (1)
Karthik Viswanath Ganti (1) +
Neil Girdhar (1)
Ralf Gommers (158)
Rohit Goswami (4)
Saarthak Gupta (4) +
Matt Haberland (325)
Sasha Hafner (1) +
Joren Hammudoglu (9)
Chengyu Han (1) +
Charles Harris (1)
Kim Hsieh (4) +
Yongcai Huang (2) +
Lukas Huber (1) +
Yuji Ikeda (2) +
Guido Imperiale (104) +
Robert Kern (2)
Harin Khakhi (2) +
Agriya Khetarpal (4)
Kirill R. (2) +
Tetsuo Koyama (1)
Jigyasu Krishnan (1) +
Abhishek Kumar (2) +
Pratham Kumar (3) +
David Kun (1) +
Eric Larson (3)
lciti (1)
Antony Lee (1)
Kieran Leschinski (1) +
Thomas Li (2) +
Christian Lorentzen (2)
Loïc Estève (4)
Panos Mavrogiorgos (1) +
Nikolay Mayorov (2)
Melissa Weber Mendonça (10)
Michał Górny (1)
Miguel Cárdenas (2) +
Swastik Mishra (1) +
Sturla Molden (2)
Andreas Nazlidis (1) +
Andrew Nelson (209)
Parth Nobel (1) +
Nick ODell (9)
Giacomo Petrillo (1)
Victor PM (10) +
pmav99 (1) +
Ilhan Polat (73)
Tyler Reddy (96)
Érico Nogueira Rolim (1) +
Pamphile Roy (10)
Mikhail Ryazanov (6)
Atsushi Sakai (9)
Marco Salathe (1) +
sanvi (1) +
Neil Schemenauer (2) +
Daniel Schmitz (20)
Martin Schuck (1) +
Dan Schult (33)
Tomer Sery (19)
Adrian Seyboldt (1) +
Scott Shambaugh (4)
ShannonS00 (1) +
sildater (3) +
Param Singh (1) +
G Sreeja (7) +
Albert Steppi (133)
Kai Striega (3)
Anushka Suyal (2)
Julia Tatz (1) +
Tearyt (1) +
Elia Tomasi (1) +
Jamie Townsend (2) +
Edgar Andrés Margffoy Tuay (4)
Matthias Urlichs (1) +
Mark van Rossum (1) +
Jacob Vanderplas (2)
David Varela (2) +
Christian Veenhuis (3)
vfdev (1)
Stefan van der Walt (2)
Warren Weckesser (5)
Jason N. White (1) +
windows-server-2003 (5)
Zhiqing Xiao (1)
Pavadol Yamsiri (1)
Rory Yorke (3)
Irwin Zaid (4)
Austin Zhang (1) +
William Zijie Zhang (1) +
Zaikun Zhang (1) +
Zhenyu Zhu (1) +
Eric Zitong Zhou (11) +
Case Zumbrum (2) +
ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) (45)
A total of 124 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.
Complete issue and PR lists are available in the README.txt release artifact.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.16.0 is not released yet!
SciPy 1.16.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.16.x branch, and on adding new features on the main branch.
This release requires Python 3.11-3.13 and NumPy 1.25.2 or greater.
Improved experimental support for the Python array API standard, including new support in scipy.signal, and additional support in scipy.stats and scipy.special. Improved support for JAX and Dask backends has been added, with notable support in scipy.cluster.hierarchy, many functions in scipy.special, and many of the trimmed statistics functions.
scipy.optimize now uses the new Python implementation from the [PRIMA](https://www.libprima.net) package for COBYLA. The PRIMA implementation [fixes many bugs](https://github.com/libprima/prima#bug-fixes) in the old Fortran 77 implementation with [a better performance on average](https://github.com/libprima/prima#improvements).
scipy.sparse.coo_array now supports n-D arrays with reshaping, arithmetic and reduction operations like sum/mean/min/max. No n-D indexing or scipy.sparse.random_array support yet.
Updated guide and tools for migration from sparse matrices to sparse arrays.
All functions in the scipy.linalg namespace that accept array arguments now support N-dimensional arrays to be processed as a batch.
Two new scipy.signal functions, scipy.signal.firwin_2d and scipy.signal.closest_STFT_dual_window, for creation of a 2-D FIR filter and scipy.signal.ShortTimeFFT dual window calculation, respectively.
A new class, scipy.spatial.transform.RigidTransform, provides functionality to convert between different representations of rigid transforms in 3-D space.
scipy.io.savemat now provides informative warnings for invalid field names.
scipy.io.mmread now provides a clearer error message when provided with a source file path that does not exist.
scipy.io.wavfile.read can now read non-seekable files.
The error estimate of scipy.integrate.tanhsinh was improved.
Batch support was added to scipy.interpolate.make_smoothing_spline.
All functions in the scipy.linalg namespace that accept array arguments now support N-dimensional arrays to be processed as a batch. See linalg_batch for details.
scipy.linalg.sqrtm is rewritten in C and its performance is improved. It also tries harder to return real-valued results for real-valued inputs if possible. See the function docstring for more details. In this version the input argument disp and the optional output argument errest are deprecated and will be removed four versions later. Similarly, after changing the underlying algorithm to recursion, the blocksize keyword argument has no effect and will be removed two versions later.
Wrappers for ?stevd, ?langb, ?sytri, ?hetri and ?gbcon were added to scipy.linalg.lapack.
The default driver of scipy.linalg.eigh_tridiagonal was improved.
scipy.linalg.solve can now estimate the reciprocal condition number and the matrix norm calculation is more efficient.
A new function scipy.ndimage.vectorized_filter for generic filters that take advantage of a vectorized Python callable was added.
scipy.ndimage.rotate has improved performance, especially on ARM platforms.
COBYLA was updated to use the new Python implementation from the [PRIMA](https://www.libprima.net) package.
The PRIMA implementation [fixes many bugs](https://github.com/libprima/prima#bug-fixes>) in the old Fortran 77 implementation. In addition, it results in [fewer function evaluations on average](https://github.com/libprima/prima#improvements),
but it depends on the problem and for some problems it can result in more function evaluations or a less optimal result. For those cases the user can try modifying the initial and final trust region radii given by rhobeg and tol respectively. A larger rhobeg can help the algorithm take bigger steps initially, while a smaller tol can help it continue and find a better solution. For more information, see the [PRIMA documentation](https://www.libprima.net).
Several of the scipy.optimize.minimize methods, and the scipy.optimize.least_squares function, have been given a workers keyword. This allows parallelization of some calculations via a map-like callable, such as multiprocessing.Pool. These parallelization opportunities typically occur during numerical differentiation. This can greatly speed up minimization when the objective function is expensive to calculate.
The lm method of scipy.optimize.least_squares can now accept 3-point and cs for the jac keyword.
The SLSQP Fortran 77 code was ported to C. When this method is used now the constraint multipliers are exposed to the user through the multiplier keyword of the returned scipy.optimize.OptimizeResult object.
NNLS code has been corrected and rewritten in C to address the performance regression introduced in 1.15.x
scipy.optimize.root now warns for invalid inner parameters when using the newton_krylov method
The return value of minimization with method='L-BFGS-B' now has a faster hess_inv.todense() implementation. Time complexity has improved from cubic to quadratic.
scipy.optimize.least_squares has a new callback argument that is applicable to the trf and dogbox methods. callback may be used to track optimization results at each step or to provide custom conditions for stopping.
A new function scipy.signal.firwin_2d for the creation of a 2-D FIR Filter using the 1-D window method was added.
scipy.signal.cspline1d_eval and scipy.signal.qspline1d_eval now provide an informative error on empty input rather than hitting the recursion limit.
A new function scipy.signal.closest_STFT_dual_window to calculate the ~scipy.signal.ShortTimeFFT dual window of a given window closest to a desired dual window.
A new classmethod scipy.signal.ShortTimeFFT.from_win_equals_dual to create a ~scipy.signal.ShortTimeFFT instance where the window and its dual are equal up to a scaling factor. It allows to create short-time Fourier transforms which are unitary mappings.
The performance of scipy.signal.convolve2d was improved.
scipy.sparse.coo_array now supports n-D arrays using binary and reduction operations.
Faster operations between two DIA arrays/matrices for: add, sub, multiply, matmul.
scipy.sparse.csgraph.dijkstra shortest_path is more efficient.
scipy.sparse.csgraph.yen has performance improvements.
Support for lazy loading of sparse.csgraph and sparse.linalg was added.
A new class, scipy.spatial.transform.RigidTransform, provides functionality to convert between different representations of rigid transforms in 3-D space, its application to vectors and transform composition. It follows the same design approach as scipy.spatial.transform.Rotation.
scipy.spatial.transform.Rotation now has an appropriate __repr__ method, and improved performance for its scipy.spatial.transform.Rotation.apply method.
A new function scipy.stats.quantile, an array API compatible function for quantile estimation, was added.
scipy.stats.make_distribution was extended to work with existing discrete distributions and to facilitate the creation of custom distributions in the new random variable infrastructure.
A new distribution, scipy.stats.Binomial, was added.
An equal_var keyword was added to scipy.stats.tukey_hsd (enables the Games-Howell test) and scipy.stats.f_oneway (enables Welch ANOVA).
The moment calculation for scipy.stats.gennorm was improved.
The scipy.stats.mode implementation was vectorized, for faster batch calculation.
Support for axis, nan_policy, and keepdims keywords was added to scipy.stats.power_divergence, scipy.stats.chisquare, scipy.stats.pointbiserialr, scipy.stats.kendalltau, scipy.stats.weightedtau, scipy.stats.theilslopes, scipy.stats.siegelslopes, and scipy.stats.boxcox_llf.
The performance of scipy.stats.special_ortho_group and scipy.stats.pearsonr was improved.
Experimental support for array libraries other than NumPy has been added to multiple submodules in recent versions of SciPy. Please consider testing these features by setting the environment variable SCIPY_ARRAY_API=1 and providing PyTorch, JAX, CuPy or Dask arrays as array arguments.
Many functions in scipy.stats, scipy.special, scipy.optimize, and scipy.constants now provide tables documenting compatible array and device types as well as support for lazy arrays and JIT compilation. New features with support and old features with support added for SciPy 1.16.0 include:
Most of the scipy.signal functionality
scipy.ndimage.vectorized_filter
scipy.special.stdtrit
scipy.special.softmax
scipy.special.log_softmax
scipy.stats.quantile
scipy.stats.gstd
scipy.stats.rankdata
Features with extended array API support (generally, improved support for JAX and Dask) in SciPy 1.16.0 include:
many of the scipy.cluster.hierarchy functions
many functions in scipy.special
many of the trimmed statistics functions in scipy.stats
SciPy now has a CI job that exercises GPU (CUDA) support, and as a result using PyTorch, CuPy or JAX arrays on GPU with SciPy is now more reliable.
The unused atol argument of scipy.optimize.nnls is deprecated and will be removed in SciPy 1.18.0.
The disp argument of scipy.linalg.signm, scipy.linalg.logm, and scipy.linalg.sqrtm will be removed in SciPy 1.18.0.
scipy.stats.multinomial now emits a FutureWarning if the rows of p do not sum to 1.0. This condition will produce NaNs beginning in SciPy 1.18.0.
scipy.sparse.conjtransp has been removed. Use .T.conj() instead.
The quadrature='trapz' option has been removed from scipy.integrate.quad_vec, and scipy.stats.trapz has been removed. Use trapezoid in both instances instead.
scipy.special.comb and scipy.special.perm now raise when exact=True and arguments are non-integral.
Support for inference of the two sets of measurements from the single argument x has been removed from scipy.stats.linregress. The data must be specified separately as x and y.
Support for NumPy masked arrays has been removed from scipy.stats.power_divergence and scipy.stats.chisquare.
Several of the scipy.linalg functions for solving a linear system (e.g. scipy.linalg.solve) documented that the RHS argument must be either 1-D or 2-D but did not always raise an error when the RHS argument had more the two dimensions. Now, many-dimensional right hand sides are treated according to the rules specified in linalg_batch.
scipy.stats.bootstrap now explicitly broadcasts elements of data to the same shape (ignoring axis) before performing the calculation.
The minimum supported version of Clang was bumped from 12.0 to 15.0.
The lowest supported macOS version for wheels on PyPI is now 10.14 instead of 10.13.
The sdist contents were optimized, resulting in a size reduction of about 50%, from 60 MB to 30 MB.
For Cython>=3.1.0, SciPy now uses the new cython --generate-shared functionality, which reduces the total size of SciPy's wheels and on-disk installations significantly.
SciPy no longer contains an internal shared library that requires RPATH support, after sf_error_state was removed from scipy.special.
A new build option -Duse-system-libraries has been added. It allows opting in to using system libraries instead of using vendored sources. Currently Boost.Math and Qhull are supported as system build dependencies.
The internal dependency of scipy._lib on scipy.sparse was removed, which reduces the import time of a number of other SciPy submodules.
Support for free-threaded CPython was improved: the last known thread-safety issues in scipy.special were fixed, and pytest-run-parallel is now used in a CI job to guard against regressions.
Support for [spin](https://github.com/scientific-python/spin) as a developer CLI was added, including support for editable installs. The SciPy-specific python dev.py CLI will be removed in the next release cycle in favor of spin.
The vendored Qhull library was upgraded from version 2019.1 to 2020.2.
A large amount of the C++ code in scipy.special was moved to the new header-only [xsf](https://github.com/scipy/xsf) library. That library was included back in the SciPy source tree as a git submodule.
The namedtuple-like bunch objects returned by some SciPy functions now have improved compatibility with the polars library.
The output of the rvs method of scipy.stats.wrapcauchy is now mapped to the unit circle between 0 and 2 * pi.
The lm method of scipy.optimize.least_squares now has a different behavior for the maximum number of function evaluations, max_nfev. The default for the lm method is changed to 100 * n, for both a callable and a numerically estimated jacobian. This limit on function evaluations excludes those used for any numerical estimation of the Jacobian. Previously the default when using an estimated jacobian was 100 * n * (n + 1), because the method included evaluations used in the estimation. In addition, for the lm method the number of function calls used in Jacobian approximation is no longer included in OptimizeResult.nfev. This brings the behavior of lm, trf, and dogbox into line.
Name (commits)
h-vetinari (4)
aiudirog (1) +
Anton Akhmerov (2)
Thorsten Alteholz (1) +
Gabriel Augusto (1) +
Backfisch263 (1) +
Nickolai Belakovski (5)
Peter Bell (1)
Benoît W. (1) +
Evandro Bernardes (1)
Gauthier Berthomieu (1) +
Maxwell Bileschi (1) +
Sam Birch (1) +
Florian Bourgey (3) +
Charles Bousseau (2) +
Richard Strong Bowen (2) +
Jake Bowhay (126)
Matthew Brett (1)
Dietrich Brunn (52)
Evgeni Burovski (252)
Christine P. Chai (12) +
Gayatri Chakkithara (1) +
Saransh Chopra (2) +
Omer Cohen (1) +
Lucas Colley (91)
Yahya Darman (3) +
Benjamin Eisele (1) +
Donnie Erb (1)
Sagi Ezri (58) +
Alexander Fabisch (2) +
Matthew H Flamm (1)
Karthik Viswanath Ganti (1) +
Neil Girdhar (1)
Ralf Gommers (153)
Rohit Goswami (4)
Saarthak Gupta (4) +
Matt Haberland (320)
Sasha Hafner (1) +
Joren Hammudoglu (9)
Chengyu Han (1) +
Charles Harris (1)
Kim Hsieh (4) +
Yongcai Huang (2) +
Lukas Huber (1) +
Yuji Ikeda (2) +
Guido Imperiale (103) +
Robert Kern (2)
Harin Khakhi (2) +
Agriya Khetarpal (4)
Kirill R. (2) +
Tetsuo Koyama (1)
Jigyasu Krishnan (1) +
Pratham Kumar (3) +
David Kun (1) +
Eric Larson (3)
lciti (1)
Antony Lee (1)
Kieran Leschinski (1) +
Thomas Li (2) +
Christian Lorentzen (2)
Loïc Estève (4)
Panos Mavrogiorgos (1) +
Nikolay Mayorov (2)
Melissa Weber Mendonça (10)
Miguel Cárdenas (2) +
Swastik Mishra (1) +
Sturla Molden (2)
Andreas Nazlidis (1) +
Andrew Nelson (209)
Parth Nobel (1) +
Nick ODell (9)
Giacomo Petrillo (1)
Victor PM (10) +
pmav99 (1) +
Ilhan Polat (73)
Tyler Reddy (66)
Érico Nogueira Rolim (1) +
Pamphile Roy (10)
Mikhail Ryazanov (6)
Atsushi Sakai (9)
Marco Salathe (1) +
sanvi (1) +
Neil Schemenauer (2) +
Daniel Schmitz (20)
Martin Schuck (1) +
Dan Schult (32)
Tomer Sery (19)
Adrian Seyboldt (1) +
Scott Shambaugh (4)
ShannonS00 (1) +
sildater (3) +
Param Singh (1) +
G Sreeja (7) +
Albert Steppi (133)
Kai Striega (3)
Anushka Suyal (2)
Julia Tatz (1) +
Tearyt (1) +
Elia Tomasi (1) +
Jamie Townsend (2) +
Edgar Andrés Margffoy Tuay (4)
Matthias Urlichs (1) +
Mark van Rossum (1) +
Jacob Vanderplas (2)
David Varela (2) +
Christian Veenhuis (3)
vfdev (1)
Stefan van der Walt (2)
Warren Weckesser (5)
Jason N. White (1) +
windows-server-2003 (5)
Zhiqing Xiao (1)
Pavadol Yamsiri (1)
Rory Yorke (3)
Irwin Zaid (4)
Austin Zhang (1) +
William Zijie Zhang (1) +
Zaikun Zhang (1) +
Eric Zitong Zhou (11) +
Case Zumbrum (2) +
ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) (45)
A total of 121 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.
Full issue and PR lists are available in the README.txt release artifact.
SciPy 1.15.3 is a bug-fix release with no new features compared to 1.15.2.
SciPy 1.15.3 is a bug-fix release with no new features
compared to 1.15.2.
For the complete issue and PR lists see the raw release notes.
A total of 24 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.15.2 is a bug-fix release with no new features compared to 1.15.1. Free-threaded Python 3.13 wheels for Linux ARM platform are available on Py
SciPy 1.15.2 is a bug-fix release with no new features
compared to 1.15.1. Free-threaded Python 3.13 wheels
for Linux ARM platform are available on PyPI starting with
this release.
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.15.1 is a bug-fix release with no new features compared to 1.15.0. Importantly, an issue with the import of scipy.optimize breaking other pack
SciPy 1.15.1 is a bug-fix release with no new features
compared to 1.15.0. Importantly, an issue with the
import of scipy.optimize breaking other packages
has been fixed.
A total of 5 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
SciPy 1.15.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.15.x branch, and on adding new features on the main branch.
This release requires Python 3.10-3.13 and NumPy 1.23.5 or greater.
Sparse arrays are now fully functional for 1-D and 2-D arrays. We recommend
that all new code use sparse arrays instead of sparse matrices and that
developers start to migrate their existing code from sparse matrix to sparse
array: migration_to_sparray. Both sparse.linalg and sparse.csgraph
work with either sparse matrix or sparse array and work internally with
sparse array.
Sparse arrays now provide basic support for n-D arrays in the COO format
including add, subtract, reshape, transpose, matmul,
dot, tensordot and others. More functionality is coming in future
releases.
Preliminary support for free-threaded Python 3.13.
New probability distribution features in scipy.stats can be used to improve
the speed and accuracy of existing continuous distributions and perform new
probability calculations.
Several new features support vectorized calculations with Python Array API Standard compatible input (see "Array API Standard Support" below):
scipy.differentiate is a new top-level submodule for accurate
estimation of derivatives of black box functions.scipy.optimize.elementwise contains new functions for root-finding and
minimization of univariate functions.scipy.integrate offers new functions cubature, tanhsinh, and
nsum for multivariate integration, univariate integration, and
univariate series summation, respectively.scipy.interpolate.AAA adds the AAA algorithm for barycentric rational
approximation of real or complex functions.
scipy.special adds new functions offering improved Legendre function
implementations with a more consistent interface.
scipy.differentiate introductionThe new scipy.differentiate sub-package contains functions for accurate
estimation of derivatives of black box functions.
scipy.differentiate.derivative for first-order derivatives of
scalar-in, scalar-out functions.scipy.differentiate.jacobian for first-order partial derivatives of
vector-in, vector-out functions.scipy.differentiate.hessian for second-order partial derivatives of
vector-in, scalar-out functions.All functions use high-order finite difference rules with adaptive (real) step size. To facilitate batch computation, these functions are vectorized and support several Array API compatible array libraries in addition to NumPy (see "Array API Standard Support" below).
scipy.integrate improvementsscipy.integrate.cubature function supports multidimensional
integration, and has support for approximating integrals with
one or more sets of infinite limits.scipy.integrate.tanhsinh is now exposed for public use, allowing
evaluation of a convergent integral using tanh-sinh quadrature.scipy.integrate.nsum evaluates finite and infinite series and their
logarithms.scipy.integrate.lebedev_rule computes abscissae and weights for
integration over the surface of a sphere.QUADPACK Fortran77 package has been ported to C.scipy.interpolate improvementsscipy.interpolate.AAA adds the AAA algorithm for barycentric rational
approximation of real or complex functions.scipy.interpolate.FloaterHormannInterpolator adds barycentric rational
interpolation.scipy.interpolate.make_splrep and
scipy.interpolate.make_splprep implement construction of smoothing splines.
The algorithmic content is equivalent to FITPACK (splrep and splprep
functions, and *UnivariateSpline classes) and the user API is consistent
with make_interp_spline: these functions receive data arrays and return
a scipy.interpolate.BSpline instance.scipy.interpolate.generate_knots implements the
FITPACK strategy for selecting knots of a smoothing spline given the
smoothness parameter, s. The function exposes the internal logic of knot
selection that splrep and *UnivariateSpline was using.scipy.linalg improvementsscipy.linalg.interpolative Fortran77 code has been ported to Cython.scipy.linalg.solve supports several new values for the assume_a
argument, enabling faster computation for diagonal, tri-diagonal, banded, and
triangular matrices. Also, when assume_a is left unspecified, the
function now automatically detects and exploits diagonal, tri-diagonal,
and triangular structures.scipy.linalg matrix creation functions (scipy.linalg.circulant,
scipy.linalg.companion, scipy.linalg.convolution_matrix,
scipy.linalg.fiedler, scipy.linalg.fiedler_companion, and
scipy.linalg.leslie) now support batch
matrix creation.scipy.linalg.funm is faster.scipy.linalg.orthogonal_procrustes now supports complex input.scipy.linalg.lapack: ?lantr, ?sytrs, ?hetrs, ?trcon,
and ?gtcon.scipy.linalg.expm was rewritten in C.scipy.linalg.null_space now accepts the new arguments overwrite_a,
check_finite, and lapack_driver.id_dist Fortran code was rewritten in Cython.scipy.ndimage improvementsaxes argument
that specifies which axes of the input filtering is to be performed on.
These include correlate, convolve, generic_laplace, laplace,
gaussian_laplace, derivative2, generic_gradient_magnitude,
gaussian_gradient_magnitude and generic_filter.axes
argument that specifies which axes of the input filtering is to be performed
on.scipy.ndimage.rank_filter time complexity has improved from n to
log(n).scipy.optimize improvements1.4.0 to 1.8.0,
bringing accuracy and performance improvements to solvers.MINPACK Fortran77 package has been ported to C.L-BFGS-B Fortran77 package has been ported to C.scipy.optimize.elementwise namespace includes functions
bracket_root, find_root, bracket_minimum, and find_minimum
for root-finding and minimization of univariate functions. To facilitate
batch computation, these functions are vectorized and support several
Array API compatible array libraries in addition to NumPy (see
"Array API Standard Support" below). Compared to existing functions (e.g.
scipy.optimize.root_scalar and scipy.optimize.minimize_scalar),
these functions can offer speedups of over 100x when used with NumPy arrays,
and even greater gains are possible with other Array API Standard compatible
array libraries (e.g. CuPy).scipy.optimize.differential_evolution now supports more general use of
workers, such as passing a map-like callable.scipy.optimize.nnls was rewritten in Cython.HessianUpdateStrategy now supports __matmul__.scipy.signal improvementssignal.chirp().scipy.signal.lombscargle has two new arguments, weights and
floating_mean, enabling sample weighting and removal of an unknown
y-offset independently for each frequency. Additionally, the normalize
argument includes a new option to return the complex representation of the
amplitude and phase.scipy.signal.envelope for computation of the envelope of a
real or complex valued signal.scipy.sparse improvementssparse.linalg.is_sptriangular and
sparse.linalg.spbandwidth mimic the existing dense tools
linalg.is_triangular and linalg.bandwidth.sparse.linalg and sparse.csgraph now work with sparse arrays. Be
careful that your index arrays are 32-bit. We are working on 64bit support.ARPACK library has been upgraded to version 3.9.1.axis argument for
count_nonzero.float16.min, max, argmin, and argmax now support computation
over nonzero elements only via the new explicit argument.get_index_dtype and safely_cast_index_arrays are
available to facilitate index array casting in sparse.scipy.spatial improvementsRotation.concatenate now accepts a bare Rotation object, and will
return a copy of it.scipy.special improvementsNew functions offering improved Legendre function implementations with a more consistent interface. See respective docstrings for more information.
scipy.special.legendre_p, scipy.special.legendre_p_allscipy.special.assoc_legendre_p, scipy.special.assoc_legendre_p_allscipy.special.sph_harm_y, scipy.special.sph_harm_y_allscipy.special.sph_legendre_p, scipy.special.sph_legendre_p_all,The factorial functions special.{factorial,factorial2,factorialk} now
offer an extension to the complex domain by passing the kwarg
extend='complex'. This is opt-in because it changes the values for
negative inputs (which by default return 0), as well as for some integers
(in the case of factorial2 and factorialk; for more details,
check the respective docstrings).
scipy.special.zeta now defines the Riemann zeta function on the complex
plane.
scipy.special.softplus computes the softplus function
The spherical Bessel functions (scipy.special.spherical_jn,
scipy.special.spherical_yn, scipy.special.spherical_in, and
scipy.special.spherical_kn) now support negative arguments with real dtype.
scipy.special.logsumexp now preserves precision when one element of the
sum has magnitude much bigger than the rest.
The accuracy of several functions has been improved:
scipy.special.ncfdtr, scipy.special.nctdtr, and
scipy.special.gdtrib have been improved throughout the domain.scipy.special.hyperu is improved for the case of b=1, small x,
and small a.scipy.special.logit is improved near the argument p=0.5.scipy.special.rel_entr is improved when x/y overflows, underflows,
or is close to 1.scipy.special.ndtr is now more efficient for sqrt(2)/2 < |x| < 1.
scipy.stats improvementsA new probability distribution infrastructure has been added for the
implementation of univariate, continuous distributions. It has several
speed, accuracy, memory, and interface advantages compared to the
previous infrastructure. See rv_infrastructure for a tutorial.
scipy.stats.make_distribution to treat an existing continuous
distribution (e.g. scipy.stats.norm) with the new infrastructure.
This can improve the speed and accuracy of existing distributions,
especially those with methods not overridden with distribution-specific
formulas.scipy.stats.Normal and scipy.stats.Uniform are pre-defined classes
to represent the normal and uniform distributions, respectively.
Their interfaces may be faster and more convenient than those produced by
make_distribution.scipy.stats.Mixture can be used to represent mixture distributions.Instances of scipy.stats.Normal, scipy.stats.Uniform, and the classes
returned by scipy.stats.make_distribution are supported by several new
mathematical transformations.
scipy.stats.truncate for truncation of the support.scipy.stats.order_statistic for the order statistics of a given number
of IID random variables.scipy.stats.abs, scipy.stats.exp, and scipy.stats.log. For example,
scipy.stats.abs(Normal()) is distributed according to the folded normal
and scipy.stats.exp(Normal()) is lognormally distributed.The new scipy.stats.lmoment calculates sample l-moments and l-moment
ratios. Notably, these sample estimators are unbiased.
scipy.stats.chatterjeexi computes the Xi correlation coefficient, which
can detect nonlinear dependence. The function also performs a hypothesis
test of independence between samples.
scipy.stats.wilcoxon has improved method resolution logic for the default
method='auto'. Other values of method provided by the user are now
respected in all cases, and the method argument approx has been
renamed to asymptotic for consistency with similar functions. (Use of
approx is still allowed for backward compatibility.)
There are several new probability distributions:
scipy.stats.dpareto_lognorm represents the double Pareto lognormal
distribution.scipy.stats.landau represents the Landau distribution.scipy.stats.normal_inverse_gamma represents the normal-inverse-gamma
distribution.scipy.stats.poisson_binom represents the Poisson binomial distribution.Batch calculation with scipy.stats.alexandergovern and
scipy.stats.combine_pvalues is faster.
scipy.stats.chisquare added an argument sum_check. By default, the
function raises an error when the sum of expected and obseved frequencies
are not equal; setting sum_check=False disables this check to
facilitate hypothesis tests other than Pearson's chi-squared test.
The accuracy of several distribution methods has been improved, including:
scipy.stats.nct method pdfscipy.stats.crystalball method sfscipy.stats.geom method rvsscipy.stats.cauchy methods logpdf, pdf, ppf and isflogcdf and/or logsf methods of distributions that do not
override the generic implementation of these methods, including
scipy.stats.beta, scipy.stats.betaprime, scipy.stats.cauchy,
scipy.stats.chi, scipy.stats.chi2, scipy.stats.exponweib,
scipy.stats.gamma, scipy.stats.gompertz, scipy.stats.halflogistic,
scipy.stats.hypsecant, scipy.stats.invgamma, scipy.stats.laplace,
scipy.stats.levy, scipy.stats.loggamma, scipy.stats.maxwell,
scipy.stats.nakagami, and scipy.stats.t.scipy.stats.qmc.PoissonDisk now accepts lower and upper bounds
parameters l_bounds and u_bounds.
scipy.stats.fisher_exact now supports two-dimensional tables with shapes
other than (2, 2).
SciPy 1.15 has preliminary support for the free-threaded build of CPython
3.13. This allows SciPy functionality to execute in parallel with Python
threads
(see the threading stdlib module). This support was enabled by fixing a
significant number of thread-safety issues in both pure Python and
C/C++/Cython/Fortran extension modules. Wheels are provided on PyPI for this
release; NumPy >=2.1.3 is required at runtime. Note that building for a
free-threaded interpreter requires a recent pre-release or nightly for Cython
3.1.0.
Support for free-threaded Python does not mean that SciPy is fully thread-safe.
Please see scipy_thread_safety for more details.
If you are interested in free-threaded Python, for example because you have a
multiprocessing-based workflow that you are interested in running with Python
threads, we encourage testing and experimentation. If you run into problems
that you suspect are because of SciPy, please open an issue, checking first if
the bug also occurs in the "regular" non-free-threaded CPython 3.13 build.
Many threading bugs can also occur in code that releases the GIL; disabling
the GIL only makes it easier to hit threading bugs.
Experimental support for array libraries other than NumPy has been added to
existing sub-packages in recent versions of SciPy. Please consider testing
these features by setting an environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, ndonnx, or CuPy arrays as array arguments. Features
with support added for SciPy 1.15.0 include:
scipy.differentiate (new sub-package)scipy.optimize.elementwise (new namespace)scipy.optimize.rosen, scipy.optimize.rosen_der, and
scipy.optimize.rosen_hessscipy.special.logsumexpscipy.integrate.trapezoidscipy.integrate.tanhsinh (newly public function)scipy.integrate.cubature (new function)scipy.integrate.nsum (new function)scipy.special.chdtr, scipy.special.betainc, and scipy.special.betainccscipy.stats.boxcox_llfscipy.stats.differential_entropyscipy.stats.zmap, scipy.stats.zscore, and scipy.stats.gzscorescipy.stats.tmean, scipy.stats.tvar, scipy.stats.tstd,
scipy.stats.tsem, scipy.stats.tmin, and scipy.stats.tmaxscipy.stats.gmean, scipy.stats.hmean and scipy.stats.pmeanscipy.stats.combine_pvaluesscipy.stats.ttest_ind, scipy.stats.ttest_relscipy.stats.directional_statsscipy.ndimage functions will now delegate to cupyx.scipy.ndimage,
and for other backends will transit via NumPy arrays on the host.scipy.linalg.interpolative.rand and
scipy.linalg.interpolative.seed have been deprecated and will be removed
in SciPy 1.17.0.scipy.spatial.distance.cosine and
scipy.spatial.distance.correlation have been deprecated and will raise
an error in SciPy 1.17.0.scipy.spatial.distance.kulczynski1 and
scipy.spatial.distance.sokalmichener were deprecated and will be removed
in SciPy 1.17.0.scipy.stats.find_repeats is deprecated and will be
removed in SciPy 1.17.0. Please use
numpy.unique/numpy.unique_counts instead.scipy.linalg.kron is deprecated in favour of numpy.kron.scipy.signal
convolution/correlation functions (scipy.signal.correlate,
scipy.signal.convolve and scipy.signal.choose_conv_method) and
filtering functions (scipy.signal.lfilter, scipy.signal.sosfilt) has
been deprecated and will be removed in SciPy 1.17.0.scipy.stats.linregress has deprecated one-argument use; the two
variables must be specified as separate arguments.scipy.stats.trapz is deprecated in favor of scipy.stats.trapezoid.scipy.special.lpn is deprecated in favor of scipy.special.legendre_p_all.scipy.special.lpmn and scipy.special.clpmn are deprecated in favor of
scipy.special.assoc_legendre_p_all.scipy.special.sph_harm has been deprecated in favor of
scipy.special.sph_harm_y.r and c arrays passed to scipy.linalg.toeplitz,
scipy.linalg.matmul_toeplitz, or scipy.linalg.solve_toeplitz will be
treated as batches of 1-D coefficients beginning in SciPy 1.17.0.random_state and permutations arguments of
scipy.stats.ttest_ind are deprecated. Use method to perform a
permutation test, instead.scipy.signal have been removed. This includes
daub, qmf, cascade, morlet, morlet2, ricker,
and cwt. Users should use pywavelets instead.scipy.signal.cmplx_sort has been removed.scipy.integrate.quadrature and scipy.integrate.romberg have been
removed in favour of scipy.integrate.quad.scipy.stats.rvs_ratio_uniforms has been removed in favor of
scipy.stats.sampling.RatioUniforms.scipy.special.factorial now raises an error for non-integer scalars when
exact=True.scipy.integrate.cumulative_trapezoid now raises an error for values of
initial other than 0 and None.scipy.interpolate.Akima1DInterpolator
and scipy.interpolate.PchipInterpolatorspecial.btdtr and special.btdtri have been removed.exact= kwarg in special.factorialk has changed
from True to False.scipy.misc submodule have been removed.interpolate.BSpline.integrate output is now always a numpy array.
Previously, for 1D splines the output was a python float or a 0D array
depending on the value of the extrapolate argument.scipy.stats.wilcoxon now respects the method argument provided by the
user. Previously, even if method='exact' was specified, the function
would resort to method='approx' in some cases.scipy.integrate.AccuracyWarning has been removed as the functions the
warning was emitted from (scipy.integrate.quadrature and
scipy.integrate.romberg) have been removed.A separate accompanying type stubs package, scipy-stubs, will be made
available with the 1.15.0 release. Installation instructions are
available.
scipy.stats.bootstrap now emits a FutureWarning if the shapes of the
input arrays do not agree. Broadcast the arrays to the same batch shape
(i.e. for all dimensions except those specified by the axis argument)
to avoid the warning. Broadcasting will be performed automatically in the
future.
SciPy endorsed SPEC-7,
which proposes a rng argument to control pseudorandom number generation
(PRNG) in a standard way, replacing legacy arguments like seed and
random_sate. In many cases, use of rng will change the behavior of
the function unless the argument is already an instance of
numpy.random.Generator.
Effective in SciPy 1.15.0:
rng argument has been added to the following functions:
scipy.cluster.vq.kmeans, scipy.cluster.vq.kmeans2,
scipy.interpolate.BarycentricInterpolator,
scipy.interpolate.barycentric_interpolate,
scipy.linalg.clarkson_woodruff_transform,
scipy.optimize.basinhopping,
scipy.optimize.differential_evolution, scipy.optimize.dual_annealing,
scipy.optimize.check_grad, scipy.optimize.quadratic_assignment,
scipy.sparse.random, scipy.sparse.random_array, scipy.sparse.rand,
scipy.sparse.linalg.svds, scipy.spatial.transform.Rotation.random,
scipy.spatial.distance.directed_hausdorff,
scipy.stats.goodness_of_fit, scipy.stats.BootstrapMethod,
scipy.stats.PermutationMethod, scipy.stats.bootstrap,
scipy.stats.permutation_test, scipy.stats.dunnett, all
scipy.stats.qmc classes that consume random numbers, and
scipy.stats.sobol_indices.rng argument will follow the SPEC 7
standard behavior: the argument will be normalized with
np.random.default_rng before being used.It is planned that in 1.17.0 the legacy argument will start emitting
warnings, and that in 1.19.0 the default behavior will change.
In all cases, users can avoid future disruption by proactively passing
an instance of np.random.Generator by keyword rng. For details,
see SPEC-7.
The SciPy build no longer adds -std=legacy for Fortran code,
except when using Gfortran. This avoids problems with the new Flang and
AMD Fortran compilers. It may make new build warnings appear for other
compilers - if so, please file an issue.
scipy.signal.sosfreqz has been renamed to scipy.signal.freqz_sos.
New code should use the new name. The old name is maintained as an alias for
backwards compatibility.
Testing thread-safety improvements related to Python 3.13t have been
made in: scipy.special, scipy.spatial, scipy.sparse,
scipy.interpolate.
A total of 149 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.15.0 is not released yet!
SciPy 1.15.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.15.x branch, and on adding new features on the main branch.
This release requires Python 3.10-3.13 and NumPy 1.23.5 or greater.
Sparse arrays are now fully functional for 1-D and 2-D arrays. We recommend
that all new code use sparse arrays instead of sparse matrices and that
developers start to migrate their existing code from sparse matrix to sparse
array: migration_to_sparray. Both sparse.linalg and sparse.csgraph
work with either sparse matrix or sparse array and work internally with
sparse array.
Sparse arrays now provide basic support for n-D arrays in the COO format
including add, subtract, reshape, transpose, matmul,
dot, tensordot and others. More functionality is coming in future
releases.
Preliminary support for free-threaded Python 3.13.
New probability distribution features in scipy.stats can be used to improve
the speed and accuracy of existing continuous distributions and perform new
probability calculations.
Several new features support vectorized calculations with Python Array API Standard compatible input (see "Array API Standard Support" below):
scipy.differentiate is a new top-level submodule for accurate
estimation of derivatives of black box functions.scipy.optimize.elementwise contains new functions for root-finding and
minimization of univariate functions.scipy.integrate offers new functions cubature, tanhsinh, and
nsum for multivariate integration, univariate integration, and
univariate series summation, respectively.scipy.interpolate.AAA adds the AAA algorithm for barycentric rational
approximation of real or complex functions.
scipy.special adds new functions offering improved Legendre function
implementations with a more consistent interface.
scipy.differentiate introductionThe new scipy.differentiate sub-package contains functions for accurate
estimation of derivatives of black box functions.
scipy.differentiate.derivative for first-order derivatives of
scalar-in, scalar-out functions.scipy.differentiate.jacobian for first-order partial derivatives of
vector-in, vector-out functions.scipy.differentiate.hessian for second-order partial derivatives of
vector-in, scalar-out functions.All functions use high-order finite difference rules with adaptive (real) step size. To facilitate batch computation, these functions are vectorized and support several Array API compatible array libraries in addition to NumPy (see "Array API Standard Support" below).
scipy.integrate improvementsscipy.integrate.cubature function supports multidimensional
integration, and has support for approximating integrals with
one or more sets of infinite limits.scipy.integrate.tanhsinh is now exposed for public use, allowing
evaluation of a convergent integral using tanh-sinh quadrature.scipy.integrate.nsum evaluates finite and infinite series and their
logarithms.scipy.integrate.lebedev_rule computes abscissae and weights for
integration over the surface of a sphere.QUADPACK Fortran77 package has been ported to C.scipy.interpolate improvementsscipy.interpolate.AAA adds the AAA algorithm for barycentric rational
approximation of real or complex functions.scipy.interpolate.FloaterHormannInterpolator adds barycentric rational
interpolation.scipy.interpolate.make_splrep and
scipy.interpolate.make_splprep implement construction of smoothing splines.
The algorithmic content is equivalent to FITPACK (splrep and splprep
functions, and *UnivariateSpline classes) and the user API is consistent
with make_interp_spline: these functions receive data arrays and return
a scipy.interpolate.BSpline instance.scipy.interpolate.generate_knots implements the
FITPACK strategy for selecting knots of a smoothing spline given the
smoothness parameter, s. The function exposes the internal logic of knot
selection that splrep and *UnivariateSpline was using.scipy.linalg improvementsscipy.linalg.interpolative Fortran77 code has been ported to Cython.scipy.linalg.solve supports several new values for the assume_a
argument, enabling faster computation for diagonal, tri-diagonal, banded, and
triangular matrices. Also, when assume_a is left unspecified, the
function now automatically detects and exploits diagonal, tri-diagonal,
and triangular structures.scipy.linalg matrix creation functions (scipy.linalg.circulant,
scipy.linalg.companion, scipy.linalg.convolution_matrix,
scipy.linalg.fiedler, scipy.linalg.fiedler_companion, and
scipy.linalg.leslie) now support batch
matrix creation.scipy.linalg.funm is faster.scipy.linalg.orthogonal_procrustes now supports complex input.scipy.linalg.lapack: ?lantr, ?sytrs, ?hetrs, ?trcon,
and ?gtcon.scipy.linalg.expm was rewritten in C.scipy.linalg.null_space now accepts the new arguments overwrite_a,
check_finite, and lapack_driver.id_dist Fortran code was rewritten in Cython.scipy.ndimage improvementsaxes argument
that specifies which axes of the input filtering is to be performed on.
These include correlate, convolve, generic_laplace, laplace,
gaussian_laplace, derivative2, generic_gradient_magnitude,
gaussian_gradient_magnitude and generic_filter.axes
argument that specifies which axes of the input filtering is to be performed
on.scipy.ndimage.rank_filter time complexity has improved from n to
log(n).scipy.optimize improvements1.4.0 to 1.8.0,
bringing accuracy and performance improvements to solvers.MINPACK Fortran77 package has been ported to C.L-BFGS-B Fortran77 package has been ported to C.scipy.optimize.elementwise namespace includes functions
bracket_root, find_root, bracket_minimum, and find_minimum
for root-finding and minimization of univariate functions. To facilitate
batch computation, these functions are vectorized and support several
Array API compatible array libraries in addition to NumPy (see
"Array API Standard Support" below). Compared to existing functions (e.g.
scipy.optimize.root_scalar and scipy.optimize.minimize_scalar),
these functions can offer speedups of over 100x when used with NumPy arrays,
and even greater gains are possible with other Array API Standard compatible
array libraries (e.g. CuPy).scipy.optimize.differential_evolution now supports more general use of
workers, such as passing a map-like callable.scipy.optimize.nnls was rewritten in Cython.HessianUpdateStrategy now supports __matmul__.scipy.signal improvementssignal.chirp().scipy.signal.lombscargle has two new arguments, weights and
floating_mean, enabling sample weighting and removal of an unknown
y-offset independently for each frequency. Additionally, the normalize
argument includes a new option to return the complex representation of the
amplitude and phase.scipy.signal.envelope for computation of the envelope of a
real or complex valued signal.scipy.sparse improvementssparse.linalg.is_sptriangular and
sparse.linalg.spbandwidth mimic the existing dense tools
linalg.is_triangular and linalg.bandwidth.sparse.linalg and sparse.csgraph now work with sparse arrays. Be
careful that your index arrays are 32-bit. We are working on 64bit support.ARPACK library has been upgraded to version 3.9.1.axis argument for
count_nonzero.float16.min, max, argmin, and argmax now support computation
over nonzero elements only via the new explicit argument.get_index_dtype and safely_cast_index_arrays are
available to facilitate index array casting in sparse.scipy.spatial improvementsRotation.concatenate now accepts a bare Rotation object, and will
return a copy of it.scipy.special improvementsNew functions offering improved Legendre function implementations with a more consistent interface. See respective docstrings for more information.
scipy.special.legendre_p, scipy.special.legendre_p_allscipy.special.assoc_legendre_p, scipy.special.assoc_legendre_p_allscipy.special.sph_harm_y, scipy.special.sph_harm_y_allscipy.special.sph_legendre_p, scipy.special.sph_legendre_p_all,The factorial functions special.{factorial,factorial2,factorialk} now
offer an extension to the complex domain by passing the kwarg
extend='complex'. This is opt-in because it changes the values for
negative inputs (which by default return 0), as well as for some integers
(in the case of factorial2 and factorialk; for more details,
check the respective docstrings).
scipy.special.zeta now defines the Riemann zeta function on the complex
plane.
scipy.special.softplus computes the softplus function
The spherical Bessel functions (scipy.special.spherical_jn,
scipy.special.spherical_yn, scipy.special.spherical_in, and
scipy.special.spherical_kn) now support negative arguments with real dtype.
scipy.special.logsumexp now preserves precision when one element of the
sum has magnitude much bigger than the rest.
The accuracy of several functions has been improved:
scipy.special.ncfdtr, scipy.special.nctdtr, and
scipy.special.gdtrib have been improved throughout the domain.scipy.special.hyperu is improved for the case of b=1, small x,
and small a.scipy.special.logit is improved near the argument p=0.5.scipy.special.rel_entr is improved when x/y overflows, underflows,
or is close to 1.scipy.special.ndtr is now more efficient for sqrt(2)/2 < |x| < 1.
scipy.stats improvementsA new probability distribution infrastructure has been added for the
implementation of univariate, continuous distributions. It has several
speed, accuracy, memory, and interface advantages compared to the
previous infrastructure. See rv_infrastructure for a tutorial.
scipy.stats.make_distribution to treat an existing continuous
distribution (e.g. scipy.stats.norm) with the new infrastructure.
This can improve the speed and accuracy of existing distributions,
especially those with methods not overridden with distribution-specific
formulas.scipy.stats.Normal and scipy.stats.Uniform are pre-defined classes
to represent the normal and uniform distributions, respectively.
Their interfaces may be faster and more convenient than those produced by
make_distribution.scipy.stats.Mixture can be used to represent mixture distributions.Instances of scipy.stats.Normal, scipy.stats.Uniform, and the classes
returned by scipy.stats.make_distribution are supported by several new
mathematical transformations.
scipy.stats.truncate for truncation of the support.scipy.stats.order_statistic for the order statistics of a given number
of IID random variables.scipy.stats.abs, scipy.stats.exp, and scipy.stats.log. For example,
scipy.stats.abs(Normal()) is distributed according to the folded normal
and scipy.stats.exp(Normal()) is lognormally distributed.The new scipy.stats.lmoment calculates sample l-moments and l-moment
ratios. Notably, these sample estimators are unbiased.
scipy.stats.chatterjeexi computes the Xi correlation coefficient, which
can detect nonlinear dependence. The function also performs a hypothesis
test of independence between samples.
scipy.stats.wilcoxon has improved method resolution logic for the default
method='auto'. Other values of method provided by the user are now
respected in all cases, and the method argument approx has been
renamed to asymptotic for consistency with similar functions. (Use of
approx is still allowed for backward compatibility.)
There are several new probability distributions:
scipy.stats.dpareto_lognorm represents the double Pareto lognormal
distribution.scipy.stats.landau represents the Landau distribution.scipy.stats.normal_inverse_gamma represents the normal-inverse-gamma
distribution.scipy.stats.poisson_binom represents the Poisson binomial distribution.Batch calculation with scipy.stats.alexandergovern and
scipy.stats.combine_pvalues is faster.
scipy.stats.chisquare added an argument sum_check. By default, the
function raises an error when the sum of expected and obseved frequencies
are not equal; setting sum_check=False disables this check to
facilitate hypothesis tests other than Pearson's chi-squared test.
The accuracy of several distribution methods has been improved, including:
scipy.stats.nct method pdfscipy.stats.crystalball method sfscipy.stats.geom method rvsscipy.stats.cauchy methods logpdf, pdf, ppf and isflogcdf and/or logsf methods of distributions that do not
override the generic implementation of these methods, including
scipy.stats.beta, scipy.stats.betaprime, scipy.stats.cauchy,
scipy.stats.chi, scipy.stats.chi2, scipy.stats.exponweib,
scipy.stats.gamma, scipy.stats.gompertz, scipy.stats.halflogistic,
scipy.stats.hypsecant, scipy.stats.invgamma, scipy.stats.laplace,
scipy.stats.levy, scipy.stats.loggamma, scipy.stats.maxwell,
scipy.stats.nakagami, and scipy.stats.t.scipy.stats.qmc.PoissonDisk now accepts lower and upper bounds
parameters l_bounds and u_bounds.
scipy.stats.fisher_exact now supports two-dimensional tables with shapes
other than (2, 2).
SciPy 1.15 has preliminary support for the free-threaded build of CPython
3.13. This allows SciPy functionality to execute in parallel with Python
threads
(see the threading stdlib module). This support was enabled by fixing a
significant number of thread-safety issues in both pure Python and
C/C++/Cython/Fortran extension modules. Wheels are provided on PyPI for this
release; NumPy >=2.1.3 is required at runtime. Note that building for a
free-threaded interpreter requires a recent pre-release or nightly for Cython
3.1.0.
Support for free-threaded Python does not mean that SciPy is fully thread-safe.
Please see scipy_thread_safety for more details.
If you are interested in free-threaded Python, for example because you have a
multiprocessing-based workflow that you are interested in running with Python
threads, we encourage testing and experimentation. If you run into problems
that you suspect are because of SciPy, please open an issue, checking first if
the bug also occurs in the "regular" non-free-threaded CPython 3.13 build.
Many threading bugs can also occur in code that releases the GIL; disabling
the GIL only makes it easier to hit threading bugs.
Experimental support for array libraries other than NumPy has been added to
existing sub-packages in recent versions of SciPy. Please consider testing
these features by setting an environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, ndonnx, or CuPy arrays as array arguments. Features
with support added for SciPy 1.15.0 include:
scipy.differentiate (new sub-package)scipy.optimize.elementwise (new namespace)scipy.optimize.rosen, scipy.optimize.rosen_der, and
scipy.optimize.rosen_hessscipy.special.logsumexpscipy.integrate.trapezoidscipy.integrate.tanhsinh (newly public function)scipy.integrate.cubature (new function)scipy.integrate.nsum (new function)scipy.special.chdtr, scipy.special.betainc, and scipy.special.betainccscipy.stats.boxcox_llfscipy.stats.differential_entropyscipy.stats.zmap, scipy.stats.zscore, and scipy.stats.gzscorescipy.stats.tmean, scipy.stats.tvar, scipy.stats.tstd,
scipy.stats.tsem, scipy.stats.tmin, and scipy.stats.tmaxscipy.stats.gmean, scipy.stats.hmean and scipy.stats.pmeanscipy.stats.combine_pvaluesscipy.stats.ttest_ind, scipy.stats.ttest_relscipy.stats.directional_statsscipy.ndimage functions will now delegate to cupyx.scipy.ndimage,
and for other backends will transit via NumPy arrays on the host.scipy.linalg.interpolative.rand and
scipy.linalg.interpolative.seed have been deprecated and will be removed
in SciPy 1.17.0.scipy.spatial.distance.cosine and
scipy.spatial.distance.correlation have been deprecated and will raise
an error in SciPy 1.17.0.scipy.spatial.distance.kulczynski1 and
scipy.spatial.distance.sokalmichener were deprecated and will be removed
in SciPy 1.17.0.scipy.stats.find_repeats is deprecated as of SciPy 1.15.0 and will be
removed in SciPy 1.17.0. Please use
numpy.unique/numpy.unique_counts instead.scipy.linalg.kron is deprecated in favour of numpy.kron.scipy.signal
convolution/correlation functions (scipy.signal.correlate,
scipy.signal.convolve and scipy.signal.choose_conv_method) and
filtering functions (scipy.signal.lfilter, scipy.signal.sosfilt) has
been deprecated as of SciPy 1.15.0 and will be removed in SciPy
1.17.0.scipy.stats.linregress has deprecated one-argument use; the two
variables must be specified as separate arguments.scipy.stats.trapz is deprecated in favor of scipy.stats.trapezoid.scipy.special.lpn is deprecated in favor of scipy.special.legendre_p_all.scipy.special.lpmn and scipy.special.clpmn are deprecated in favor of
scipy.special.assoc_legendre_p_all.scipy.special.sph_harm has been deprecated in favor of
scipy.special.sph_harm_y.scipy.linalg.toeplitz has
been deprecated. It will support batching in SciPy 1.17.0.random_state and permutations arguments of
scipy.stats.ttest_ind are deprecated. Use method to perform a
permutation test, instead.scipy.signal have been removed. This includes
daub, qmf, cascade, morlet, morlet2, ricker,
and cwt. Users should use pywavelets instead.scipy.signal.cmplx_sort has been removed.scipy.integrate.quadrature and scipy.integrate.romberg have been
removed in favour of scipy.integrate.quad.scipy.stats.rvs_ratio_uniforms has been removed in favor of
scipy.stats.sampling.RatioUniforms.scipy.special.factorial now raises an error for non-integer scalars when
exact=True.scipy.integrate.cumulative_trapezoid now raises an error for values of
initial other than 0 and None.scipy.interpolate.Akima1DInterpolator
and scipy.interpolate.PchipInterpolatorspecial.btdtr and special.btdtri have been removed.exact= kwarg in special.factorialk has changed
from True to False.scipy.misc submodule have been removed.interpolate.BSpline.integrate output is now always a numpy array.
Previously, for 1D splines the output was a python float or a 0D array
depending on the value of the extrapolate argument.scipy.stats.wilcoxon now respects the method argument provided by the
user. Previously, even if method='exact' was specified, the function
would resort to method='approx' in some cases.scipy.integrate.AccuracyWarning has been removed as the functions the
warning was emitted from (scipy.integrate.quadrature and
scipy.integrate.romberg) have been removed.A separate accompanying type stubs package, scipy-stubs, will be made
available with the 1.15.0 release. Installation instructions are
available.
scipy.stats.bootstrap now emits a FutureWarning if the shapes of the
input arrays do not agree. Broadcast the arrays to the same batch shape
(i.e. for all dimensions except those specified by the axis argument)
to avoid the warning. Broadcasting will be performed automatically in the
future.
SciPy endorsed SPEC-7,
which proposes a rng argument to control pseudorandom number generation
(PRNG) in a standard way, replacing legacy arguments like seed and
random_sate. In many cases, use of rng will change the behavior of
the function unless the argument is already an instance of
numpy.random.Generator.
Effective in SciPy 1.15.0:
rng argument has been added to the following functions:
scipy.cluster.vq.kmeans, scipy.cluster.vq.kmeans2,
scipy.interpolate.BarycentricInterpolator,
scipy.interpolate.barycentric_interpolate,
scipy.linalg.clarkson_woodruff_transform,
scipy.optimize.basinhopping,
scipy.optimize.differential_evolution, scipy.optimize.dual_annealing,
scipy.optimize.check_grad, scipy.optimize.quadratic_assignment,
scipy.sparse.random, scipy.sparse.random_array, scipy.sparse.rand,
scipy.sparse.linalg.svds, scipy.spatial.transform.Rotation.random,
scipy.spatial.distance.directed_hausdorff,
scipy.stats.goodness_of_fit, scipy.stats.BootstrapMethod,
scipy.stats.PermutationMethod, scipy.stats.bootstrap,
scipy.stats.permutation_test, scipy.stats.dunnett, all
scipy.stats.qmc classes that consume random numbers, and
scipy.stats.sobol_indices.rng argument will follow the SPEC 7
standard behavior: the argument will be normalized with
np.random.default_rng before being used.It is planned that in 1.17.0 the legacy argument will start emitting
warnings, and that in 1.19.0 the default behavior will change.
In all cases, users can avoid future disruption by proactively passing
an instance of np.random.Generator by keyword rng. For details,
see SPEC-7.
The SciPy build no longer adds -std=legacy for Fortran code,
except when using Gfortran. This avoids problems with the new Flang and
AMD Fortran compilers. It may make new build warnings appear for other
compilers - if so, please file an issue.
scipy.signal.sosfreqz has been renamed to scipy.signal.freqz_sos.
New code should use the new name. The old name is maintained as an alias for
backwards compatibility.
Testing thread-safety improvements related to Python 3.13t have been
made in: scipy.special, scipy.spatial, scipy.sparse,
scipy.interpolate.
A total of 149 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.15.0 is not released yet!
SciPy 1.15.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.15.x branch, and on adding new features on the main branch.
This release requires Python 3.10-3.13 and NumPy 1.23.5 or greater.
migration_to_sparray. Both sparse.linalg and sparse.csgraph
work with either sparse matrix or sparse array and work internally with
sparse array.add, subtract, reshape, transpose, matmul,
dot, tensordot and others. More functionality is coming in future
releases.scipy.stats can be used to improve
the speed and accuracy of existing continuous distributions and perform new
probability calculations.scipy.differentiate is a new top-level submodule for accurate
estimation of derivatives of black box functions.scipy.optimize.elementwise provides vectorized root-finding and
minimization of univariate functions, and it supports the array API
as do new integrate functions tanhsinh, nsum, and cubature.scipy.interpolate.AAA adds the AAA algorithm for barycentric rational
approximation of real or complex functions.scipy.differentiate introductionThe new scipy.differentiate sub-package contains functions for accurate
estimation of derivatives of black box functions.
scipy.differentiate.derivative for first-order derivatives of
scalar-in, scalar-out functions.scipy.differentiate.jacobian for first-order partial derivatives of
vector-in, vector-out functions.scipy.differentiate.hessian for second-order partial derivatives of
vector-in, scalar-out functions.All functions use high-order finite difference rules with adaptive (real) step size. To facilitate batch computation, these functions are vectorized and support several Array API compatible array libraries in addition to NumPy (see "Array API Standard Support" below).
scipy.integrate improvementsQUADPACK Fortran77 package has been ported to C.scipy.integrate.lebedev_rule computes abscissae and weights for
integration over the surface of a sphere.scipy.integrate.nsum evaluates finite and infinite series and their
logarithms.scipy.integrate.tanhsinh is now exposed for public use, allowing
evaluation of a convergent integral using tanh-sinh quadrature.scipy.integrate.cubature function supports multidimensional
integration, and has support for approximating integrals with
one or more sets of infinite limits.scipy.interpolate improvementsscipy.interpolate.AAA adds the AAA algorithm for barycentric rational
approximation of real or complex functions.scipy.interpolate.FloaterHormannInterpolator adds barycentric rational
interpolation.scipy.interpolate.make_splrep and
scipy.interpolate.make_splprep implement construction of smoothing splines.
The algorithmic content is equivalent to FITPACK (splrep and splprep
functions, and *UnivariateSpline classes) and the user API is consistent
with make_interp_spline: these functions receive data arrays and return
a scipy.interpolate.BSpline instance.scipy.interpolate.generate_knots implements the
FITPACK strategy for selecting knots of a smoothing spline given the
smoothness parameter, s. The function exposes the internal logic of knot
selection that splrep and *UnivariateSpline was using.scipy.linalg improvementsscipy.linalg.interpolative Fortran77 code has been ported to Cython.scipy.linalg.solve supports several new values for the assume_a
argument, enabling faster computation for diagonal, tri-diagonal, banded, and
triangular matrices. Also, when assume_a is left unspecified, the
function now automatically detects and exploits diagonal, tri-diagonal,
and triangular structures.scipy.linalg matrix creation functions (scipy.linalg.circulant,
scipy.linalg.companion, scipy.linalg.convolution_matrix,
scipy.linalg.fiedler, scipy.linalg.fiedler_companion, and
scipy.linalg.leslie) now support batch
matrix creation.scipy.linalg.funm is faster.scipy.linalg.orthogonal_procrustes now supports complex input.scipy.linalg.lapack: ?lantr, ?sytrs, ?hetrs, ?trcon,
and ?gtcon.scipy.linalg.expm was rewritten in C.scipy.linalg.null_space now accepts the new arguments overwrite_a,
check_finite, and lapack_driver.id_dist Fortran code was rewritten in Cython.scipy.ndimage improvementsaxes argument
that specifies which axes of the input filtering is to be performed on.
These include correlate, convolve, generic_laplace, laplace,
gaussian_laplace, derivative2, generic_gradient_magnitude,
gaussian_gradient_magnitude and generic_filter.axes
argument that specifies which axes of the input filtering is to be performed
on.scipy.ndimage.rank_filter time complexity has improved from n to
log(n).scipy.optimize improvements1.4.0 to 1.8.0,
bringing accuracy and performance improvements to solvers.MINPACK Fortran77 package has been ported to C.L-BFGS-B Fortran77 package has been ported to C.scipy.optimize.elementwise namespace includes functions
bracket_root, find_root, bracket_minimum, and find_minimum
for root-finding and minimization of univariate functions. To facilitate
batch computation, these functions are vectorized and support several
Array API compatible array libraries in addition to NumPy (see
"Array API Standard Support" below). Compared to existing functions (e.g.
scipy.optimize.root_scalar and scipy.optimize.minimize_scalar),
these functions can offer speedups of over 100x when used with NumPy arrays,
and even greater gains are possible with other Array API Standard compatible
array libraries (e.g. CuPy).scipy.optimize.differential_evolution now supports more general use of
workers, such as passing a map-like callable.scipy.optimize.nnls was rewritten in Cython.HessianUpdateStrategy now supports __matmul__.scipy.signal improvementssignal.chirp().scipy.signal.lombscargle has two new arguments, weights and
floating_mean, enabling sample weighting and removal of an unknown
y-offset independently for each frequency. Additionally, the normalize
argument includes a new option to return the complex representation of the
amplitude and phase.scipy.signal.envelope for computation of the envelope of a
real or complex valued signal.scipy.sparse improvementsmigration guide<migration_to_sparray> is now available for
moving from sparse.matrix to sparse.array in your code/library.sparse.linalg.is_sptriangular and
sparse.linalg.spbandwidth mimic the existing dense tools
linalg.is_triangular and linalg.bandwidth.sparse.linalg and sparse.csgraph now work with sparse arrays. Be
careful that your index arrays are 32-bit. We are working on 64bit support.ARPACK library has been upgraded to version 3.9.1.axis argument for
count_nonzero.float16.min, max, argmin, and argmax now support computation
over nonzero elements only via the new explicit argument.get_index_dtype and safely_cast_index_arrays are
available to facilitate index array casting in sparse.scipy.spatial improvementsRotation.concatenate now accepts a bare Rotation object, and will
return a copy of it.scipy.special improvementsThe factorial functions special.{factorial,factorial2,factorialk} now
offer an extension to the complex domain by passing the kwarg
extend='complex'. This is opt-in because it changes the values for
negative inputs (which by default return 0), as well as for some integers
(in the case of factorial2 and factorialk; for more details,
check the respective docstrings).
scipy.special.zeta now defines the Riemann zeta function on the complex
plane.
scipy.special.softplus computes the softplus function
The spherical Bessel functions (scipy.special.spherical_jn,
scipy.special.spherical_yn, scipy.special.spherical_in, and
scipy.special.spherical_kn) now support negative arguments with real dtype.
scipy.special.logsumexp now preserves precision when one element of the
sum has magnitude much bigger than the rest.
The accuracy of several functions has been improved:
scipy.special.ncfdtr and scipy.special.nctdtr have been improved
throughout the domain.scipy.special.hyperu is improved for the case of b=1, small x,
and small a.scipy.special.logit is improved near the argument p=0.5.scipy.special.rel_entr is improved when x/y overflows, underflows,
or is close to 1.scipy.special.gdtrib may now be used in a CuPy ElementwiseKernel on
GPUs.
scipy.special.ndtr is now more efficient.
scipy.stats improvementsA new probability distribution infrastructure has been added for the implementation of univariate, continuous distributions with speed, accuracy, and memory advantages:
scipy.stats.Normal represents the normal distribution with the new
interface. In typical cases, its methods are faster and more accurate than
those of scipy.stats.norm.scipy.stats.make_distribution to treat an existing continuous
distribution (e.g. scipy.stats.norm) with the new infrastructure.
This can improve the speed and accuracy of existing distributions,
especially for methods not overridden with custom formulas in the
implementation.scipy.stats.Mixture has been added to represent mixture distributions.
Instances of scipy.stats.Normal and the classes returned by
scipy.stats.make_distribution are supported by several new mathematical
transformations.
scipy.stats.truncate for truncation of the support.scipy.stats.order_statistic for the order statistics of a given number
of IID random variables.scipy.stats.abs, scipy.stats.exp, and scipy.stats.log. For example,
scipy.stats.abs(Normal()) is distributed according to the folded normal
and scipy.stats.exp(Normal()) is lognormally distributed.The new scipy.stats.lmoment calculates sample l-moments and l-moment
ratios. Notably, these sample estimators are unbiased.
scipy.stats.chatterjeexi computes the Xi correlation coefficient, which
can detect nonlinear dependence. The function also performs a hypothesis
test of independence between samples.
scipy.stats.wilcoxon has improved method resolution logic for the default
method='auto'. Other values of method provided by the user are now
respected in all cases, and the method argument approx has been
renamed to asymptotic for consistency with similar functions. (Use of
approx is still allowed for backward compatibility.)
There are several new probability distributions:
scipy.stats.dpareto_lognorm represents the double Pareto lognormal
distribution.scipy.stats.landau represents the Landau distribution.scipy.stats.normal_inverse_gamma represents the normal-inverse-gamma
distribution.scipy.stats.poisson_binom represents the Poisson binomial distribution.Batch calculation with scipy.stats.alexandergovern and
scipy.stats.combine_pvalues is faster.
scipy.stats.chisquare added an argument sum_check. By default, the
function raises an error when the sum of expected and obseved frequencies
are not equal; setting sum_check=False disables this check to
facilitate hypothesis tests other than Pearson's chi-squared test.
The accuracy of several distribution methods has been improved, including:
scipy.stats.nct method pdfscipy.stats.crystalball method sfscipy.stats.geom method rvsscipy.stats.cauchy methods logpdf, pdf, ppf and isflogcdf and/or logsf methods of distributions that do not
override the generic implementation of these methods, including
scipy.stats.beta, scipy.stats.betaprime, scipy.stats.cauchy,
scipy.stats.chi, scipy.stats.chi2, scipy.stats.exponweib,
scipy.stats.gamma, scipy.stats.gompertz, scipy.stats.halflogistic,
scipy.stats.hypsecant, scipy.stats.invgamma, scipy.stats.laplace,
scipy.stats.levy, scipy.stats.loggamma, scipy.stats.maxwell,
scipy.stats.nakagami, and scipy.stats.t.scipy.stats.qmc.PoissonDisk now accepts lower and upper bounds
parameters l_bounds and u_bounds.
scipy.stats.fisher_exact now supports two-dimensional tables with shapes
other than (2, 2).
SciPy 1.15 has preliminary support for the free-threaded build of CPython
3.13. This allows SciPy functionality to execute in parallel with Python
threads
(see the threading stdlib module). This support was enabled by fixing a
significant number of thread-safety issues in both pure Python and
C/C++/Cython/Fortran extension modules. Wheels are provided on PyPI for this
release; NumPy >=2.1.3 is required at runtime. Note that building for a
free-threaded interpreter requires a recent pre-release or nightly for Cython
3.1.0.
Support for free-threaded Python does not mean that SciPy is fully thread-safe.
Please see :ref:scipy_thread_safety for more details.
If you are interested in free-threaded Python, for example because you have a
multiprocessing-based workflow that you are interested in running with Python
threads, we encourage testing and experimentation. If you run into problems
that you suspect are because of SciPy, please open an issue, checking first if
the bug also occurs in the "regular" non-free-threaded CPython 3.13 build.
Many threading bugs can also occur in code that releases the GIL; disabling
the GIL only makes it easier to hit threading bugs.
Experimental support for array libraries other than NumPy has been added to
existing sub-packages in recent versions of SciPy. Please consider testing
these features by setting an environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, ndonnx, or CuPy arrays as array arguments. Features
with support added for SciPy 1.15.0 include:
scipy.differentiate (new sub-package)scipy.optimize.elementwise (new namespace)scipy.optimize.rosen, scipy.optimize.rosen_der, and
scipy.optimize.rosen_hessscipy.special.logsumexpscipy.integrate.trapezoidscipy.integrate.tanhsinh (newly public function)scipy.integrate.cubature (new function)scipy.integrate.nsum (new function)scipy.special.chdtr, scipy.special.betainc, and scipy.special.betainccscipy.stats.boxcox_llfscipy.stats.differential_entropyscipy.stats.zmap, scipy.stats.zscore, and scipy.stats.gzscorescipy.stats.tmean, scipy.stats.tvar, scipy.stats.tstd,
scipy.stats.tsem, scipy.stats.tmin, and scipy.stats.tmaxscipy.stats.gmean, scipy.stats.hmean and scipy.stats.pmeanscipy.stats.combine_pvaluesscipy.stats.ttest_ind, scipy.stats.ttest_relscipy.stats.directional_statsscipy.ndimage functions will now delegate to cupyx.scipy.ndimage,
and for other backends will transit via NumPy arrays on the host.scipy.linalg.interpolative.rand and
scipy.linalg.interpolative.seed have been deprecated and will be removed
in SciPy 1.17.0.scipy.spatial.distance.cosine and
scipy.spatial.distance.correlation have been deprecated and will raise
an error in SciPy 1.17.0.scipy.spatial.distance.kulczynski1 and
scipy.spatial.distance.sokalmichener were deprecated and will be removed
in SciPy 1.17.0.scipy.stats.find_repeats is deprecated as of SciPy 1.15.0 and will be
removed in SciPy 1.17.0. Please use
numpy.unique/numpy.unique_counts instead.scipy.linalg.kron is deprecated in favour of numpy.kron.scipy.signal
convolution/correlation functions (scipy.signal.correlate,
scipy.signal.convolve and scipy.signal.choose_conv_method) and
filtering functions (scipy.signal.lfilter, scipy.signal.sosfilt) has
been deprecated as of SciPy 1.15.0 and will be removed in SciPy
1.17.0.scipy.stats.linregress has deprecated one-argument use; the two
variables must be specified as separate arguments.scipy.stats.trapz is deprecated in favor of scipy.stats.trapezoid.scipy.special.lpn is deprecated in favor of scipy.special.legendre_p_all.scipy.special.lpmn and scipy.special.clpmn are deprecated in favor of
scipy.special.assoc_legendre_p_all.scipy.linalg.toeplitz has
been deprecated. It will support batching in SciPy 1.17.0.random_state and permutations arguments of
scipy.stats.ttest_ind are deprecated. Use method to perform a
permutation test, instead.scipy.signal have been removed. This includes
daub, qmf, cascade, morlet, morlet2, ricker,
and cwt. Users should use pywavelets instead.scipy.signal.cmplx_sort has been removed.scipy.integrate.quadrature and scipy.integrate.romberg have been
removed in favour of scipy.integrate.quad.scipy.stats.rvs_ratio_uniforms has been removed in favor of
scipy.stats.sampling.RatioUniforms.scipy.special.factorial now raises an error for non-integer scalars when
exact=True.scipy.integrate.cumulative_trapezoid now raises an error for values of
initial other than 0 and None.scipy.interpolate.Akima1DInterpolator
and scipy.interpolate.PchipInterpolatorspecial.btdtr and special.btdtri have been removed.exact= kwarg in special.factorialk has changed
from True to False.scipy.misc submodule have been removed.interpolate.BSpline.integrate output is now always a numpy array.
Previously, for 1D splines the output was a python float or a 0D array
depending on the value of the extrapolate argument.scipy.stats.wilcoxon now respects the method argument provided by the
user. Previously, even if method='exact' was specified, the function
would resort to method='approx' in some cases.A separate accompanying type stubs package, scipy-stubs, will be made
available with the 1.15.0 release. Installation instructions are available <https://github.com/jorenham/scipy-stubs?tab=readme-ov-file#installation>_.
scipy.stats.bootstrap now emits a FutureWarning if the shapes of the
input arrays do not agree. Broadcast the arrays to the same batch shape
(i.e. for all dimensions except those specified by the axis argument)
to avoid the warning. Broadcasting will be performed automatically in the
future.
SciPy endorsed SPEC-7 <https://scientific-python.org/specs/spec-0007/>_,
which proposes a rng argument to control pseudorandom number generation
(PRNG) in a standard way, replacing legacy arguments like seed and
random_sate. In many cases, use of rng will change the behavior of
the function unless the argument is already an instance of
numpy.random.Generator.
Effective in SciPy 1.15.0:
rng argument has been added to the following functions:
scipy.cluster.vq.kmeans, scipy.cluster.vq.kmeans2,
scipy.interpolate.BarycentricInterpolator,
scipy.interpolate.barycentric_interpolate,
scipy.linalg.clarkson_woodruff_transform,
scipy.optimize.basinhopping,
scipy.optimize.differential_evolution, scipy.optimize.dual_annealing,
scipy.optimize.check_grad, scipy.optimize.quadratic_assignment,
scipy.sparse.random, scipy.sparse.random_array, scipy.sparse.rand,
scipy.sparse.linalg.svds, scipy.spatial.transform.Rotation.random,
scipy.spatial.distance.directed_hausdorff,
scipy.stats.goodness_of_fit, scipy.stats.BootstrapMethod,
scipy.stats.PermutationMethod, scipy.stats.bootstrap,
scipy.stats.permutation_test, scipy.stats.dunnett, all
scipy.stats.qmc classes that consume random numbers, and
scipy.stats.sobol_indices.rng argument will follow the SPEC 7
standard behavior: the argument will be normalized with
np.random.default_rng before being used.It is planned that in 1.17.0 the legacy argument will start emitting
warnings, and that in 1.19.0 the default behavior will change.
In all cases, users can avoid future disruption by proactively passing
an instance of np.random.Generator by keyword rng. For details,
see SPEC-7 <https://scientific-python.org/specs/spec-0007/>_.
The SciPy build no longer adds -std=legacy for Fortran code,
except when using Gfortran. This avoids problems with the new Flang and
AMD Fortran compilers. It may make new build warnings appear for other
compilers - if so, please file an issue.
scipy.signal.sosfreqz has been renamed to scipy.signal.freqz_sos.
New code should use the new name. The old name is maintained as an alias for
backwards compatibility.
Testing thread-safety improvements related to Python 3.13t have been
made in: scipy.special, scipy.spatial, scipy.sparse,
scipy.interpolate.
A total of 148 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.14.1 adds support for Python 3.13, including binary wheels on PyPI. Apart from that, it is a bug-fix release with no new features compared to
SciPy 1.14.1 adds support for Python 3.13, including binary
wheels on PyPI. Apart from that, it is a bug-fix release with
no new features compared to 1.14.0.
A total of 17 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
SciPy 1.14.0 is the culmination of 3 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.14.x branch, and on adding new features on the main branch.
This release requires Python 3.10+ and NumPy 1.23.5 or greater.
For running on PyPy, PyPy3 6.0+ is required.
cobyqa, has been added to scipy.optimize.minimize - this
is an interface for COBYQA (Constrained Optimization BY Quadratic
Approximations), a derivative-free optimization solver, designed to
supersede COBYLA, developed by the Department of Applied Mathematics, The
Hong Kong Polytechnic University.scipy.sparse.linalg.spsolve_triangular is now more than an order of
magnitude faster in many cases.scipy.fft improvementsscipy.fft.prev_fast_len, has been added. This function
finds the largest composite of FFT radices that is less than the target
length. It is useful for discarding a minimal number of samples before FFT.scipy.io improvementswavfile now supports reading and writing of wav files in the RF64
format, allowing files greater than 4 GB in size to be handled.scipy.constants improvementsscipy.interpolate improvementsscipy.interpolate.Akima1DInterpolator now supports extrapolation via the
extrapolate argument.scipy.optimize improvementsscipy.optimize.HessianUpdateStrategy now also accepts square arrays for
init_scale.cobyqa, has been added to scipy.optimize.minimize - this
is an interface for COBYQA (Constrained Optimization BY Quadratic
Approximations), a derivative-free optimization solver, designed to
supersede COBYLA, developed by the Department of Applied Mathematics, The
Hong Kong Polytechnic University.scipy.optimize.differential_evolution.scipy.optimize.approx_fprime now has linear space complexity.scipy.signal improvementsscipy.signal.minimum_phase has a new argument half, allowing the
provision of a filter of the same length as the linear-phase FIR filter
coefficients and with the same magnitude spectrum.scipy.sparse improvementsnp.ndarray for argmin.csr_array or csc_array yields 1D (CSC) arrays.repr and str output.dia_array by a
scalar, which avoids a potentially costly conversion to CSR format.scipy.sparse.csgraph.yen has been added, allowing usage of Yen's K-Shortest
Paths algorithm on a directed on undirected graph.scipy.sparse.linalg.spsolve_triangular is now more than an order of
magnitude faster in many cases.scipy.spatial improvementsRotation supports an alternative "scalar-first" convention of quaternion
component ordering. It is available via the keyword argument scalar_first
of from_quat and as_quat methods.Rotation objects.scipy.special improvementsscipy.special.log_wright_bessel, for calculation of the logarithm of
Wright's Bessel function.scipy.special.hyp2f1 calculations has improved
substantially.boxcox, inv_boxcox, boxcox1p, and
inv_boxcox1p by preventing premature overflow.scipy.stats improvementsscipy.stats.power can be used for simulating the power
of a hypothesis test with respect to a specified alternative.scipy.stats.irwinhall.scipy.stats.mannwhitneyu are much faster
and use less memory.scipy.stats.pearsonr now accepts n-D arrays and computes the statistic
along a specified axis.scipy.stats.kstat, scipy.stats.kstatvar, and scipy.stats.bartlett
are faster at performing calculations along an axis of a large n-D array.Experimental support for array libraries other than NumPy has been added to
existing sub-packages in recent versions of SciPy. Please consider testing
these features by setting an environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, or CuPy arrays as array arguments.
As of 1.14.0, there is support for
scipy.cluster
scipy.fft
scipy.constants
scipy.special: (select functions)
scipy.special.log_ndtrscipy.special.ndtrscipy.special.ndtriscipy.special.erfscipy.special.erfcscipy.special.i0scipy.special.i0escipy.special.i1scipy.special.i1escipy.special.gammalnscipy.special.gammaincscipy.special.gammainccscipy.special.logitscipy.special.expitscipy.special.entrscipy.special.rel_entrscipy.special.xlogyscipy.special.chdtrcscipy.stats: (select functions)
scipy.stats.describescipy.stats.momentscipy.stats.skewscipy.stats.kurtosisscipy.stats.kstatscipy.stats.kstatvarscipy.stats.circmeanscipy.stats.circvarscipy.stats.circstdscipy.stats.entropyscipy.stats.variationscipy.stats.semscipy.stats.ttest_1sampscipy.stats.pearsonrscipy.stats.chisquarescipy.stats.skewtestscipy.stats.kurtosistestscipy.stats.normaltestscipy.stats.jarque_berascipy.stats.bartlettscipy.stats.power_divergencescipy.stats.monte_carlo_testscipy.stats.gstd, scipy.stats.chisquare, and
scipy.stats.power_divergence have deprecated support for masked array
input.scipy.stats.linregress has deprecated support for specifying both samples
in one argument; x and y are to be provided as separate arguments.conjtransp method for scipy.sparse.dok_array and
scipy.sparse.dok_matrix has been deprecated and will be removed in SciPy
1.16.0.quadrature="trapz" in scipy.integrate.quad_vec has been
deprecated in favour of quadrature="trapezoid" and will be removed in
SciPy 1.16.0.scipy.special.{comb,perm} have deprecated support for use of exact=True in
conjunction with non-integral N and/or k.scipy.stats functions now produce a standardized warning message when
an input sample is too small (e.g. zero size). Previously, these functions
may have raised an error, emitted one or more less informative warnings, or
emitted no warnings. In most cases, returned results are unchanged; in almost
all cases the correct result is NaN.There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
Several previously deprecated methods for sparse arrays were removed:
asfptype, getrow, getcol, get_shape, getmaxprint,
set_shape, getnnz, and getformat. Additionally, the .A and
.H attributes were removed.
scipy.integrate.{simps,trapz,cumtrapz} have been removed in favour of
simpson, trapezoid, and cumulative_trapezoid.
The tol argument of scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk, mres,lgmres,minres,qmr,tfqmr} has been removed in favour of rtol.
Furthermore, the default value of atol for these functions has changed
to 0.0.
The restrt argument of scipy.sparse.linalg.gmres has been removed in
favour of restart.
The initial_lexsort argument of scipy.stats.kendalltau has been
removed.
The cond and rcond arguments of scipy.linalg.pinv have been
removed.
The even argument of scipy.integrate.simpson has been removed.
The turbo and eigvals arguments from scipy.linalg.{eigh,eigvalsh}
have been removed.
The legacy argument of scipy.special.comb has been removed.
The hz/nyq argument of signal.{firls, firwin, firwin2, remez} has
been removed.
Objects that weren't part of the public interface but were accessible through deprecated submodules have been removed.
float128, float96, and object arrays now raise an error in
scipy.signal.medfilt and scipy.signal.order_filter.
scipy.interpolate.interp2d has been replaced by an empty stub (to be
removed completely in the future).
Coinciding with changes to function signatures (e.g. removal of a deprecated keyword), we had deprecated positional use of keyword arguments for the affected functions, which will now raise an error. Affected functions are:
sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}stats.kendalltaulinalg.pinvintegrate.simpsonlinalg.{eigh,eigvalsh}special.combsignal.{firls, firwin, firwin2, remez}A total of 85 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.14.0 is not released yet!
SciPy 1.14.0 is the culmination of 3 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.14.x branch, and on adding new features on the main branch.
This release requires Python 3.10+ and NumPy 1.23.5 or greater.
For running on PyPy, PyPy3 6.0+ is required.
cobyqa, has been added to scipy.optimize.minimize - this
is an interface for COBYQA (Constrained Optimization BY Quadratic
Approximations), a derivative-free optimization solver, designed to
supersede COBYLA, developed by the Department of Applied Mathematics, The
Hong Kong Polytechnic University.scipy.sparse.linalg.spsolve_triangular is now more than an order of
magnitude faster in many cases.scipy.fft improvementsscipy.fft.prev_fast_len, has been added. This function
finds the largest composite of FFT radices that is less than the target
length. It is useful for discarding a minimal number of samples before FFT.scipy.io improvementswavfile now supports reading and writing of wav files in the RF64
format, allowing files greater than 4 GB in size to be handled.scipy.constants improvementsscipy.interpolate improvementsscipy.interpolate.Akima1DInterpolator now supports extrapolation via the
extrapolate argument.scipy.optimize improvementsscipy.optimize.HessianUpdateStrategy now also accepts square arrays for
init_scale.cobyqa, has been added to scipy.optimize.minimize - this
is an interface for COBYQA (Constrained Optimization BY Quadratic
Approximations), a derivative-free optimization solver, designed to
supersede COBYLA, developed by the Department of Applied Mathematics, The
Hong Kong Polytechnic University.scipy.optimize.differential_evolution.scipy.optimize.approx_fprime now has linear space complexity.scipy.signal improvementsscipy.signal.minimum_phase has a new argument half, allowing the
provision of a filter of the same length as the linear-phase FIR filter
coefficients and with the same magnitude spectrum.scipy.sparse improvementsnp.ndarray for argmin.repr and str output.dia_array by a
scalar, which avoids a potentially costly conversion to CSR format.scipy.sparse.csgraph.yen has been added, allowing usage of Yen's K-Shortest
Paths algorithm on a directed on undirected graph.scipy.sparse.linalg.spsolve_triangular is now more than an order of
magnitude faster in many cases.scipy.spatial improvementsRotation supports an alternative "scalar-first" convention of quaternion
component ordering. It is available via the keyword argument scalar_first
of from_quat and as_quat methods.Rotation objects.scipy.special improvementsscipy.special.log_wright_bessel, for calculation of the logarithm of
Wright's Bessel function.scipy.special.hyp2f1 calculations has improved
substantially.boxcox, inv_boxcox, boxcox1p, and
inv_boxcox1p by preventing premature overflow.scipy.stats improvementsscipy.stats.power can be used for simulating the power
of a hypothesis test with respect to a specified alternative.scipy.stats.irwinhall.scipy.stats.mannwhitneyu are much faster
and use less memory.scipy.stats.pearsonr now accepts n-D arrays and computes the statistic
along a specified axis.scipy.stats.kstat, scipy.stats.kstatvar, and scipy.stats.bartlett
are faster at performing calculations along an axis of a large n-D array.Experimental support for array libraries other than NumPy has been added to
existing sub-packages in recent versions of SciPy. Please consider testing
these features by setting an environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, or CuPy arrays as array arguments.
As of 1.14.0, there is support for
scipy.cluster
scipy.fft
scipy.constants
scipy.special: (select functions)
scipy.special.log_ndtrscipy.special.ndtrscipy.special.ndtriscipy.special.erfscipy.special.erfcscipy.special.i0scipy.special.i0escipy.special.i1scipy.special.i1escipy.special.gammalnscipy.special.gammaincscipy.special.gammainccscipy.special.logitscipy.special.expitscipy.special.entrscipy.special.rel_entrscipy.special.xlogyscipy.special.chdtrcscipy.stats: (select functions)
scipy.stats.describescipy.stats.momentscipy.stats.skewscipy.stats.kurtosisscipy.stats.kstatscipy.stats.kstatvarscipy.stats.circmeanscipy.stats.circvarscipy.stats.circstdscipy.stats.entropyscipy.stats.variationscipy.stats.semscipy.stats.ttest_1sampscipy.stats.pearsonrscipy.stats.chisquarescipy.stats.skewtestscipy.stats.kurtosistestscipy.stats.normaltestscipy.stats.jarque_berascipy.stats.bartlettscipy.stats.power_divergencescipy.stats.monte_carlo_testscipy.stats.gstd, scipy.stats.chisquare, and
scipy.stats.power_divergence have deprecated support for masked array
input.scipy.stats.linregress has deprecated support for specifying both samples
in one argument; x and y are to be provided as separate arguments.conjtransp method for scipy.sparse.dok_array and
scipy.sparse.dok_matrix has been deprecated and will be removed in SciPy
1.16.0.quadrature="trapz" in scipy.integrate.quad_vec has been
deprecated in favour of quadrature="trapezoid" and will be removed in
SciPy 1.16.0.scipy.special.comb has deprecated support for use of exact=True in
conjunction with non-integral N and/or k.scipy.stats functions now produce a standardized warning message when
an input sample is too small (e.g. zero size). Previously, these functions
may have raised an error, emitted one or more less informative warnings, or
emitted no warnings. In most cases, returned results are unchanged; in almost
all cases the correct result is NaN.There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
Several previously deprecated methods for sparse arrays were removed:
asfptype, getrow, getcol, get_shape, getmaxprint,
set_shape, getnnz, and getformat. Additionally, the .A and
.H attributes were removed.
scipy.integrate.{simps,trapz,cumtrapz} have been removed in favour of
simpson, trapezoid, and cumulative_trapezoid.
The tol argument of scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk, mres,lgmres,minres,qmr,tfqmr} has been removed in favour of rtol.
Furthermore, the default value of atol for these functions has changed
to 0.0.
The restrt argument of scipy.sparse.linalg.gmres has been removed in
favour of restart.
The initial_lexsort argument of scipy.stats.kendalltau has been
removed.
The cond and rcond arguments of scipy.linalg.pinv have been
removed.
The even argument of scipy.integrate.simpson has been removed.
The turbo and eigvals arguments from scipy.linalg.{eigh,eigvalsh}
have been removed.
The legacy argument of scipy.special.comb has been removed.
The hz/nyq argument of signal.{firls, firwin, firwin2, remez} has
been removed.
Objects that weren't part of the public interface but were accessible through deprecated submodules have been removed.
float128, float96, and object arrays now raise an error in
scipy.signal.medfilt and scipy.signal.order_filter.
scipy.interpolate.interp2d has been replaced by an empty stub (to be
removed completely in the future).
Coinciding with changes to function signatures (e.g. removal of a deprecated keyword), we had deprecated positional use of keyword arguments for the affected functions, which will now raise an error. Affected functions are:
sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}stats.kendalltaulinalg.pinvintegrate.simpsonlinalg.{eigh,eigvalsh}special.combsignal.{firls, firwin, firwin2, remez}A total of 85 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
Note: SciPy 1.14.0 is not released yet!
SciPy 1.14.0 is the culmination of 3 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.14.x branch, and on adding new features on the main branch.
This release requires Python 3.10+ and NumPy 1.23.5 or greater.
For running on PyPy, PyPy3 6.0+ is required.
cobyqa, has been added to scipy.optimize.minimize - this
is an interface for COBYQA (Constrained Optimization BY Quadratic
Approximations), a derivative-free optimization solver, designed to
supersede COBYLA, developed by the Department of Applied Mathematics, The
Hong Kong Polytechnic University.scipy.sparse.linalg.spsolve_triangular is now more than an order of
magnitude faster in many cases.scipy.fft improvementsscipy.fft.prev_fast_len, has been added. This function
finds the largest composite of FFT radices that is less than the target
length. It is useful for discarding a minimal number of samples before FFT.scipy.io improvementswavfile now supports reading and writing of wav files in the RF64
format, allowing files greater than 4 GB in size to be handled.scipy.constants improvementsscipy.interpolate improvementsscipy.interpolate.Akima1DInterpolator now supports extrapolation via the
extrapolate argument.scipy.optimize improvementsscipy.optimize.HessianUpdateStrategy now also accepts square arrays for
init_scale.cobyqa, has been added to scipy.optimize.minimize - this
is an interface for COBYQA (Constrained Optimization BY Quadratic
Approximations), a derivative-free optimization solver, designed to
supersede COBYLA, developed by the Department of Applied Mathematics, The
Hong Kong Polytechnic University.scipy.optimize.differential_evolution.scipy.optimize.approx_fprime now has linear space complexity.scipy.signal improvementsscipy.signal.minimum_phase has a new argument half, allowing the
provision of a filter of the same length as the linear-phase FIR filter
coefficients and with the same magnitude spectrum.scipy.sparse improvementsdia_array by a
scalar, which avoids a potentially costly conversion to CSR format.scipy.sparse.csgraph.yen has been added, allowing usage of Yen's K-Shortest
Paths algorithm on a directed on undirected graph.scipy.sparse.linalg.spsolve_triangular is now more than an order of
magnitude faster in many cases.scipy.spatial improvementsRotation supports an alternative "scalar-first" convention of quaternion
component ordering. It is available via the keyword argument scalar_first
of from_quat and as_quat methods.Rotation objects.scipy.special improvementsscipy.special.log_wright_bessel, for calculation of the logarithm of
Wright's Bessel function.scipy.special.hyp2f1 calculations has improved
substantially.boxcox, inv_boxcox, boxcox1p, and
inv_boxcox1p by preventing premature overflow.scipy.stats improvementsscipy.stats.power can be used for simulating the power
of a hypothesis test with respect to a specified alternative.scipy.stats.irwinhall.scipy.stats.mannwhitneyu are much faster
and use less memory.scipy.stats.pearsonr now accepts n-D arrays and computes the statistic
along a specified axis.scipy.stats.kstat, scipy.stats.kstatvar, and scipy.stats.bartlett
are faster at performing calculations along an axis of a large n-D array.Experimental support for array libraries other than NumPy has been added to
existing sub-packages in recent versions of SciPy. Please consider testing
these features by setting an environment variable SCIPY_ARRAY_API=1 and
providing PyTorch, JAX, or CuPy arrays as array arguments.
As of 1.14.0, there is support for
scipy.cluster
scipy.fft
scipy.constants
scipy.special: (select functions)
scipy.special.log_ndtrscipy.special.ndtrscipy.special.ndtriscipy.special.erfscipy.special.erfcscipy.special.i0scipy.special.i0escipy.special.i1scipy.special.i1escipy.special.gammalnscipy.special.gammaincscipy.special.gammainccscipy.special.logitscipy.special.expitscipy.special.entrscipy.special.rel_entrscipy.special.xlogyscipy.special.chdtrcscipy.stats: (select functions)
scipy.stats.momentscipy.stats.skewscipy.stats.kurtosisscipy.stats.kstatscipy.stats.kstatvarscipy.stats.circmeanscipy.stats.circvarscipy.stats.circstdscipy.stats.entropyscipy.stats.variationscipy.stats.semscipy.stats.ttest_1sampscipy.stats.pearsonrscipy.stats.chisquarescipy.stats.skewtestscipy.stats.kurtosistestscipy.stats.normaltestscipy.stats.jarque_berascipy.stats.bartlettscipy.stats.power_divergencescipy.stats.monte_carlo_testscipy.stats.gstd, scipy.stats.chisquare, and
scipy.stats.power_divergence have deprecated support for masked array
input.scipy.stats.linregress has deprecated support for specifying both samples
in one argument; x and y are to be provided as separate arguments.conjtransp method for scipy.sparse.dok_array and
scipy.sparse.dok_matrix has been deprecated and will be removed in SciPy
1.16.0.quadrature="trapz" in scipy.integrate.quad_vec has been
deprecated in favour of quadrature="trapezoid" and will be removed in
SciPy 1.16.0.scipy.special.comb has deprecated support for use of exact=True in
conjunction with non-integral N and/or k.scipy.stats functions now produce a standardized warning message when
an input sample is too small (e.g. zero size). Previously, these functions
may have raised an error, emitted one or more less informative warnings, or
emitted no warnings. In most cases, returned results are unchanged; in almost
all cases the correct result is NaN.There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
Several previously deprecated methods for sparse arrays were removed:
asfptype, getrow, getcol, get_shape, getmaxprint,
set_shape, getnnz, and getformat. Additionally, the .A and
.H attributes were removed.
scipy.integrate.{simps,trapz,cumtrapz} have been removed in favour of
simpson, trapezoid, and cumulative_trapezoid.
The tol argument of scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk, mres,lgmres,minres,qmr,tfqmr} has been removed in favour of rtol.
Furthermore, the default value of atol for these functions has changed
to 0.0.
The restrt argument of scipy.sparse.linalg.gmres has been removed in
favour of restart.
The initial_lexsort argument of scipy.stats.kendalltau has been
removed.
The cond and rcond arguments of scipy.linalg.pinv have been
removed.
The even argument of scipy.integrate.simpson has been removed.
The turbo and eigvals arguments from scipy.linalg.{eigh,eigvalsh}
have been removed.
The legacy argument of scipy.special.comb has been removed.
The hz/nyq argument of signal.{firls, firwin, firwin2, remez} has
been removed.
Objects that weren't part of the public interface but were accessible through deprecated submodules have been removed.
float128, float96, and object arrays now raise an error in
scipy.signal.medfilt and scipy.signal.order_filter.
scipy.interpolate.interp2d has been replaced by an empty stub (to be
removed completely in the future).
Coinciding with changes to function signatures (e.g. removal of a deprecated keyword), we had deprecated positional use of keyword arguments for the affected functions, which will now raise an error. Affected functions are:
sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}stats.kendalltaulinalg.pinvintegrate.simpsonlinalg.{eigh,eigvalsh}special.combsignal.{firls, firwin, firwin2, remez}A total of 81 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.13.1 is a bug-fix release with no new features compared to 1.13.0. The version of OpenBLAS shipped with the PyPI binaries has been increased t
SciPy 1.13.1 is a bug-fix release with no new features
compared to 1.13.0. The version of OpenBLAS shipped with
the PyPI binaries has been increased to 0.3.27.
A total of 19 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.
Complex dtypes in PchipInterpolator and Akima1DInterpolator have been deprecated and will raise an error in SciPy 1.15.0. If you are trying to use the…
SciPy 1.13.0 is the culmination of 3 months of hard work. This
out-of-band release aims to support NumPy 2.0.0, and is backwards
compatible to NumPy 1.22.4. The version of OpenBLAS used to build
the PyPI wheels has been increased to 0.3.26.dev.
This release requires Python 3.9+ and NumPy 1.22.4 or greater.
For running on PyPy, PyPy3 6.0+ is required.
2.0.0.scipy.stats functions have gained support for additional
axis, nan_policy, and keepdims arguments. scipy.stats also
has several performance and accuracy improvements.scipy.integrate improvementsterminal attribute of scipy.integrate.solve_ivp events
callables now additionally accepts integer values to specify a number
of occurrences required for termination, rather than the previous restriction
of only accepting a bool value to terminate on the first registered
event.scipy.io improvementsscipy.io.wavfile.write has improved dtype input validation.scipy.interpolate improvementsinterpolate.Akima1DInterpolator, available via the new method
argument.BSpline.insert_knot inserts a knot into a BSpline instance.
This routine is similar to the module-level scipy.interpolate.insert
function, and works with the BSpline objects instead of tck tuples.RegularGridInterpolator gained the functionality to compute derivatives
in place. For instance, RegularGridInterolator((x, y), values, method="cubic")(xi, nu=(1, 1)) evaluates the mixed second derivative,
:math:\partial^2 / \partial x \partial y at xi.RegularGridInterpolator have been changed: evaluations should be
significantly faster, while construction might be slower. If you experience
issues with construction times, you may need to experiment with optional
keyword arguments solver and solver_args. Previous behavior (fast
construction, slow evaluations) can be obtained via "*_legacy" methods:
method="cubic_legacy" is exactly equivalent to method="cubic" in
previous releases. See gh-19633 for details.scipy.signal improvementsfs).scipy.sparse improvementscoo_array now supports 1D shapes, and has additional 1D support for
min, max, argmin, and argmax. The DOK format now has
preliminary 1D support as well, though only supports simple integer indices
at the time of writing.pydata/sparse array inputs to
scipy.sparse.csgraph.dok_array and dok_matrix now have proper implementations of
fromkeys.csr and csc formats now have improved setdiag performance.scipy.spatial improvementsvoronoi_plot_2d now draws Voronoi edges to infinity more clearly
when the aspect ratio is skewed.scipy.special improvementsAMOS, specfun, and cdflib libraries
that the majority of special functions depend on, is ported to Cython/C.factorialk now also supports faster, approximate
calculation using exact=False.scipy.stats improvementsscipy.stats.rankdata and scipy.stats.wilcoxon have been vectorized,
improving their performance and the performance of hypothesis tests that
depend on them.stats.mannwhitneyu should now be faster due to a vectorized statistic
calculation, improved caching, improved exploitation of symmetry, and a
memory reduction. PermutationMethod support was also added.scipy.stats.mood now has nan_policy and keepdims support.scipy.stats.brunnermunzel now has axis and keepdims support.scipy.stats.friedmanchisquare, scipy.stats.shapiro,
scipy.stats.normaltest, scipy.stats.skewtest,
scipy.stats.kurtosistest, scipy.stats.f_oneway,
scipy.stats.alexandergovern, scipy.stats.combine_pvalues, and
scipy.stats.kstest have gained axis, nan_policy and
keepdims support.scipy.stats.boxcox_normmax has gained a ymax parameter to allow user
specification of the maximum value of the transformed data.scipy.stats.vonmises pdf method has been extended to support
kappa=0. The fit method is also more performant due to the use of
non-trivial bounds to solve for kappa.moment calculations for scipy.stats.powerlaw are now more
accurate.fit methods of scipy.stats.gamma (with method='mm') and
scipy.stats.loglaplace are faster and more reliable.scipy.stats.goodness_of_fit now supports the use of a custom statistic
provided by the user.scipy.stats.wilcoxon now supports PermutationMethod, enabling
calculation of accurate p-values in the presence of ties and zeros.scipy.stats.monte_carlo_test now has improved robustness in the face of
numerical noise.scipy.stats.wasserstein_distance_nd was introduced to compute the
Wasserstein-1 distance between two N-D discrete distributions.PchipInterpolator and Akima1DInterpolator have
been deprecated and will raise an error in SciPy 1.15.0. If you are trying
to use the real components of the passed array, use np.real on y.n together with exact=True are deprecated for
scipy.special.factorial.There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
scipy.signal.{lsim2,impulse2,step2} have been removed in favour of
scipy.signal.{lsim,impulse,step}.scipy.signal namespace and
instead should be accessed through either scipy.signal.windows or
scipy.signal.get_window.scipy.sparse no longer supports multi-Ellipsis indexingscipy.signal.{bspline,quadratic,cubic} have been removed in favour of alternatives
in scipy.interpolate.scipy.linalg.tri{,u,l} have been removed in favour of numpy.tri{,u,l}.scipy.special.factorial with exact=True now raise an
error.numpy.histogram exposed by scipy.histogram, have
been removed from SciPy's main namespace. Please use the functions directly
from numpy. This was originally performed for SciPy 1.12.0 however was missed from
the release notes so is included here for completeness.scipy.stats.moment has been renamed to order
while maintaining backward compatibility.A total of 96 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.
Complex dtypes in PchipInterpolator and Akima1DInterpolator have been deprecated and will raise an error in SciPy 1.15.0. If you are trying to use the…
Note: SciPy 1.13.0 is not released yet!
SciPy 1.13.0 is the culmination of 3 months of hard work. This
out-of-band release aims to support NumPy 2.0.0, and is backwards
compatible to NumPy 1.22.4. The version of OpenBLAS used to build
the PyPI wheels has been increased to 0.3.26.
This release requires Python 3.9+ and NumPy 1.22.4 or greater.
For running on PyPy, PyPy3 6.0+ is required.
2.0.0.scipy.stats functions have gained support for additional
axis, nan_policy, and keepdims arguments. scipy.stats also
has several performance and accuracy improvements.scipy.integrate improvementsterminal attribute of scipy.integrate.solve_ivp events
callables now additionally accepts integer values to specify a number
of occurrences required for termination, rather than the previous restriction
of only accepting a bool value to terminate on the first registered
event.scipy.io improvementsscipy.io.wavfile.write has improved dtype input validation.scipy.interpolate improvementsinterpolate.Akima1DInterpolator, available via the new method
argument.RegularGridInterpolator gained the functionality to compute derivatives
in place. For instance, RegularGridInterolator((x, y), values, method="cubic")(xi, nu=(1, 1)) evaluates the mixed second derivative,
:math:\partial^2 / \partial x \partial y at xi.RegularGridInterpolator have been changed: evaluations should be
significantly faster, while construction might be slower. If you experience
issues with construction times, you may need to experiment with optional
keyword arguments solver and solver_args. Previous behavior (fast
construction, slow evaluations) can be obtained via "*_legacy" methods:
method="cubic_legacy" is exactly equivalent to method="cubic" in
previous releases. See gh-19633 for details.scipy.signal improvementsfs).scipy.sparse improvementscoo_array now supports 1D shapes, and has additional 1D support for
min, max, argmin, and argmax. The DOK format now has
preliminary 1D support as well, though only supports simple integer indices
at the time of writing.pydata/sparse array inputs to
scipy.sparse.csgraph.dok_array and dok_matrix now have proper implementations of
fromkeys.csr and csc formats now have improved setdiag performance.scipy.spatial improvementsvoronoi_plot_2d now draws Voronoi edges to infinity more clearly
when the aspect ratio is skewed.scipy.special improvementsAMOS, specfun, and cdflib libraries
that the majority of special functions depend on, is ported to Cython/C.factorialk now also supports faster, approximate
calculation using exact=False.scipy.stats improvementsscipy.stats.rankdata and scipy.stats.wilcoxon have been vectorized,
improving their performance and the performance of hypothesis tests that
depend on them.stats.mannwhitneyu should now be faster due to a vectorized statistic
calculation, improved caching, improved exploitation of symmetry, and a
memory reduction. PermutationMethod support was also added.scipy.stats.mood now has nan_policy and keepdims support.scipy.stats.brunnermunzel now has axis and keepdims support.scipy.stats.friedmanchisquare, scipy.stats.shapiro,
scipy.stats.normaltest, scipy.stats.skewtest,
scipy.stats.kurtosistest, scipy.stats.f_oneway,
scipy.stats.alexandergovern, scipy.stats.combine_pvalues, and
scipy.stats.kstest have gained axis, nan_policy and
keepdims support.scipy.stats.boxcox_normmax has gained a ymax parameter to allow user
specification of the maximum value of the transformed data.scipy.stats.vonmises pdf method has been extended to support
kappa=0. The fit method is also more performant due to the use of
non-trivial bounds to solve for kappa.moment calculations for scipy.stats.powerlaw are now more
accurate.fit methods of scipy.stats.gamma (with method='mm') and
scipy.stats.loglaplace are faster and more reliable.scipy.stats.goodness_of_fit now supports the use of a custom statistic
provided by the user.scipy.stats.wilcoxon now supports PermutationMethod, enabling
calculation of accurate p-values in the presence of ties and zeros.scipy.stats.monte_carlo_test now has improved robustness in the face of
numerical noise.scipy.stats.wasserstein_distance_nd was introduced to compute the
Wasserstein-1 distance between two N-D discrete distributions.PchipInterpolator and Akima1DInterpolator have
been deprecated and will raise an error in SciPy 1.15.0. If you are trying
to use the real components of the passed array, use np.real on y.scipy.stats.moment has been renamed to order
while maintaining backward compatibility.A total of 91 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.
…magnitude, which can be considered as a minor backward incompatible change.
SciPy 1.12.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.12.x branch, and on adding new features on the main branch.
This release requires Python 3.9+ and NumPy 1.22.4 or greater.
For running on PyPy, PyPy3 6.0+ is required.
scipy.special, and to all of scipy.fft and scipy.cluster. There are
likely to be bugs and early feedback for usage with CuPy arrays, PyTorch
tensors, and other array API compatible libraries is appreciated. Use the
SCIPY_ARRAY_API environment variable for testing.ShortTimeFFT, provides a more versatile implementation of the
short-time Fourier transform (STFT), its inverse (ISTFT) as well as the (cross-)
spectrogram. It utilizes an improved algorithm for calculating the ISTFT.scipy.stats API now has improved support for handling
NaN values, masked arrays, and more fine-grained shape-handling. The
accuracy and performance of a number of stats methods have been improved,
and a number of new statistical tests and distributions have been added.scipy.cluster improvementsSCIPY_ARRAY_API environment
variable before importing scipy. This experimental support is still
under development and likely to contain bugs - testing is very welcome.scipy.fft improvementsfft array API standard extension module, as well as the
Fast Hankel Transforms and the basic FFTs which are not in the extension
module, now accept PyTorch tensors, CuPy arrays and array API compatible
array libraries. CPU arrays which can be converted to and from NumPy arrays
are supported module-wide and returned arrays will match the input type.
This behaviour is enabled by setting the SCIPY_ARRAY_API environment
variable before importing scipy. This experimental support is still under
development and likely to contain bugs - testing is very welcome.scipy.integrate improvementsscipy.integrate.cumulative_simpson for cumulative quadrature
from sampled data using Simpson's 1/3 rule.scipy.interpolate improvementsNdBSpline represents tensor-product splines in N dimensions.
This class only knows how to evaluate a tensor product given coefficients
and knot vectors. This way it generalizes BSpline for 1D data to N-D, and
parallels NdPPoly (which represents N-D tensor product polynomials).
Evaluations exploit the localized nature of b-splines.NearestNDInterpolator.__call__ accepts **query_options, which are
passed through to the KDTree.query call to find nearest neighbors. This
allows, for instance, to limit the neighbor search distance and parallelize
the query using the workers keyword.BarycentricInterpolator now allows computing the derivatives.CloughTocher2DInterpolator instance, while also saving the barycentric
coordinates of interpolation points.scipy.linalg improvementsdtgsyl and
stgsyl.scipy.optimize improvementsscipy.optimize.isotonic_regression has been added to allow nonparametric isotonic
regression.scipy.optimize.nnls is rewritten in Python and now implements the so-called
fnnls or fast nnls, making it more efficient for high-dimensional problems.scipy.optimize.root and scipy.optimize.root_scalar
now reports the method used.callback method of scipy.optimize.differential_evolution can now be
passed more detailed information via the intermediate_results keyword
parameter. Also, the evolution strategy now accepts a callable for
additional customization. The performance of differential_evolution has
also been improved.scipy.optimize.minimize method Newton-CG now supports functions that
return sparse Hessian matrices/arrays for the hess parameter and is slightly
more efficient.scipy.optimize.minimize method BFGS now accepts an initial estimate for the
inverse of the Hessian, which allows for more efficient workflows in some
circumstances. The new parameter is hess_inv0.scipy.optimize.minimize methods CG, Newton-CG, and BFGS now accept
parameters c1 and c2, allowing specification of the Armijo and curvature rule
parameters, respectively.scipy.optimize.curve_fit performance has improved due to more efficient memoization
of the callable function.scipy.signal improvementsfreqz, freqz_zpk, and group_delay are now more accurate
when fs has a default value.ShortTimeFFT provides a more versatile implementation of the
short-time Fourier transform (STFT), its inverse (ISTFT) as well as the (cross-)
spectrogram. It utilizes an improved algorithm for calculating the ISTFT based on
dual windows and provides more fine-grained control of the parametrization especially
in regard to scaling and phase-shift. Functionality was implemented to ease
working with signal and STFT chunks. A section has been added to the "SciPy User Guide"
providing algorithmic details. The functions stft, istft and spectrogram
have been marked as legacy.scipy.sparse improvementssparse.linalg iterative solvers sparse.linalg.cg,
sparse.linalg.cgs, sparse.linalg.bicg, sparse.linalg.bicgstab,
sparse.linalg.gmres, and sparse.linalg.qmr are rewritten in Python.6.0.1, along with a few additional
fixes.eye_array,
random_array, block_array, and identity. kron and kronsum
have been adjusted to additionally support operation on sparse arrays.axes=(1, 0), to mirror
the .T method.LaplacianNd now allows selection of the largest subset of eigenvalues,
and additionally now supports retrieval of the corresponding eigenvectors.
The performance of LaplacianNd has also been improved.dok_matrix and dok_array has been improved,
and their inheritance behavior should be more robust.hstack, vstack, and block_diag now work with sparse arrays, and
preserve the input sparse type.scipy.sparse.linalg.matrix_power, has been added, allowing
for exponentiation of sparse arrays.scipy.spatial improvementsspatial.transform.Rotation:
__pow__ to raise a rotation to integer or fractional power and
approx_equal to check if two rotations are approximately equal.Rotation.align_vectors was extended to solve a constrained
alignment problem where two vectors are required to be aligned precisely.
Also when given a single pair of vectors, the algorithm now returns the
rotation with minimal magnitude, which can be considered as a minor
backward incompatible change.spatial.transform.Rotation called Davenport
angles is available through from_davenport and as_davenport methods.distance.hamming and
distance.correlation.SphericalVoronoi sort_vertices_of_regions
and two dimensional area calculations.scipy.special improvementsscipy.special.stirling2 for computation of Stirling numbers of the
second kind. Both exact calculation and an asymptotic approximation
(the default) are supported via exact=True and exact=False (the
default) respectively.scipy.special.betaincc for computation of the complementary
incomplete Beta function and scipy.special.betainccinv for computation of
its inverse.scipy.special.betainc and scipy.special.betaincinv.scipy.special.log_ndtr, scipy.special.ndtr, scipy.special.ndtri,
scipy.special.erf, scipy.special.erfc, scipy.special.i0,
scipy.special.i0e, scipy.special.i1, scipy.special.i1e,
scipy.special.gammaln, scipy.special.gammainc, scipy.special.gammaincc,
scipy.special.logit, and scipy.special.expit now accept PyTorch tensors
and CuPy arrays. These features are still under development and likely to
contain bugs, so they are disabled by default; enable them by setting a
SCIPY_ARRAY_API environment variable to 1 before importing scipy.
Testing is appreciated!scipy.stats improvementsscipy.stats.quantile_test, a nonparametric test of whether a
hypothesized value is the quantile associated with a specified probability.
The confidence_interval method of the result object gives a confidence
interval of the quantile.scipy.stats.sampling.FastGeneratorInversion provides a convenient
interface to fast random sampling via numerical inversion of distribution
CDFs.scipy.stats.geometric_discrepancy adds geometric/topological discrepancy
metrics for random samples.scipy.stats.multivariate_normal now has a fit method for fitting
distribution parameters to data via maximum likelihood estimation.scipy.stats.bws_test performs the Baumgartner-Weiss-Schindler test of
whether two-samples were drawn from the same distribution.scipy.stats.jf_skew_t implements the Jones and Faddy skew-t distribution.scipy.stats.anderson_ksamp now supports a permutation version of the test
using the method parameter.fit methods of scipy.stats.halfcauchy, scipy.stats.halflogistic, and
scipy.stats.halfnorm are faster and more accurate.scipy.stats.beta entropy accuracy has been improved for extreme values of
distribution parameters.sf and/or isf methods have been improved for
several distributions: scipy.stats.burr, scipy.stats.hypsecant,
scipy.stats.kappa3, scipy.stats.loglaplace, scipy.stats.lognorm,
scipy.stats.lomax, scipy.stats.pearson3, scipy.stats.rdist, and
scipy.stats.pareto.axis, nan_policy, and
keep_dims: scipy.stats.entropy, scipy.stats.differential_entropy,
scipy.stats.variation, scipy.stats.ansari, scipy.stats.bartlett,
scipy.stats.levene, scipy.stats.fligner, scipy.stats.circmean,
scipy.stats.circvar, scipy.stats.circstd, scipy.stats.tmean,
scipy.stats.tvar, scipy.stats.tstd, scipy.stats.tmin, scipy.stats.tmax,
and scipy.stats.tsem.logpdf and fit methods of scipy.stats.skewnorm have been improved.scipy.stats.betanbinom.scipy.stats.invwishart rvs and logpdf.scipy.stats.boxcox_normmax with
method='mle' has been eliminated, and the returned value of lmbda is
constrained such that the transformed data will not overflow.scipy.stats.nakagami stats is more accurate and reliable.scipy.norminvgauss.pdf has been eliminated.scipy.stats.circmean, scipy.stats.circvar,
scipy.stats.circstd, and scipy.stats.entropy.scipy.stats.dirichlet has gained a new covariance (cov) method.entropy method of scipy.stats.multivariate_t for large
degrees of freedom.scipy.stats.loggamma has an improved entropy method.Error messages have been made clearer for objects that don't exist in the public namespace and warnings sharpened for private attributes that are not supposed to be imported at all.
scipy.signal.cmplx_sort has been deprecated and will be removed in
SciPy 1.15. A replacement you can use is provided in the deprecation message.
Values the the argument initial of scipy.integrate.cumulative_trapezoid
other than 0 and None are now deprecated.
scipy.stats.rvs_ratio_uniforms is deprecated in favour of
scipy.stats.sampling.RatioUniforms
scipy.integrate.quadrature and scipy.integrate.romberg have been
deprecated due to accuracy issues and interface shortcomings. They will
be removed in SciPy 1.15. Please use scipy.integrate.quad instead.
Coinciding with upcoming changes to function signatures (e.g. removal of a deprecated keyword), we are deprecating positional use of keyword arguments for the affected functions, which will raise an error starting with SciPy 1.14. In some cases, this has delayed the originally announced removal date, to give time to respond to the second part of the deprecation. Affected functions are:
linalg.{eigh, eigvalsh, pinv}integrate.simpsonsignal.{firls, firwin, firwin2, remez}sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}special.combstats.kendalltauAll wavelet functions have been deprecated, as PyWavelets provides suitable
implementations; affected functions are: signal.{daub, qmf, cascade, morlet, morlet2, ricker, cwt}
scipy.integrate.trapz, scipy.integrate.cumtrapz, and scipy.integrate.simps have
been deprecated in favour of scipy.integrate.trapezoid, scipy.integrate.cumulative_trapezoid,
and scipy.integrate.simpson respectively and will be removed in SciPy 1.14.
The tol argument of scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk,gmres,lgmres,minres,qmr,tfqmr}
is now deprecated in favour of rtol and will be removed in SciPy 1.14.
Furthermore, the default value of atol for these functions is due
to change to 0.0 in SciPy 1.14.
There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
centered keyword of scipy.stats.qmc.LatinHypercube has been removed.
Use scrambled=False instead of centered=True.scipy.stats.binom_test has been removed in favour of scipy.stats.binomtest.scipy.stats.iqr, the use of scale='raw' has been removed in favour
of scale=1.numpy.histogram exposed by scipy.histogram, have
been removed from SciPy's main namespace. Please use the functions directly
from numpy.show_config.A total of 163 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.
…magnitude, which can be considered as a minor backward incompatible change.
Note: SciPy 1.12.0 is not released yet!
SciPy 1.12.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.12.x branch, and on adding new features on the main branch.
This release requires Python 3.9+ and NumPy 1.22.4 or greater.
For running on PyPy, PyPy3 6.0+ is required.
scipy.special, and to all of scipy.fft and scipy.cluster. There are
likely to be bugs and early feedback for usage with CuPy arrays, PyTorch
tensors, and other array API compatible libraries is appreciated. Use the
SCIPY_ARRAY_API environment variable for testing.ShortTimeFFT, provides a more versatile implementation of the
short-time Fourier transform (STFT), its inverse (ISTFT) as well as the (cross-)
spectrogram. It utilizes an improved algorithm for calculating the ISTFT.scipy.stats API now has improved support for handling
NaN values, masked arrays, and more fine-grained shape-handling. The
accuracy and performance of a number of stats methods have been improved,
and a number of new statistical tests and distributions have been added.scipy.cluster improvementsSCIPY_ARRAY_API environment
variable before importing scipy. This experimental support is still
under development and likely to contain bugs - testing is very welcome.scipy.fft improvementsfft array API standard extension module, as well as the
Fast Hankel Transforms and the basic FFTs which are not in the extension
module, now accept PyTorch tensors, CuPy arrays and array API compatible
array libraries. CPU arrays which can be converted to and from NumPy arrays
are supported module-wide and returned arrays will match the input type.
This behaviour is enabled by setting the SCIPY_ARRAY_API environment
variable before importing scipy. This experimental support is still under
development and likely to contain bugs - testing is very welcome.scipy.integrate improvementsscipy.integrate.cumulative_simpson for cumulative quadrature
from sampled data using Simpson's 1/3 rule.scipy.interpolate improvementsNdBSpline represents tensor-product splines in N dimensions.
This class only knows how to evaluate a tensor product given coefficients
and knot vectors. This way it generalizes BSpline for 1D data to N-D, and
parallels NdPPoly (which represents N-D tensor product polynomials).
Evaluations exploit the localized nature of b-splines.NearestNDInterpolator.__call__ accepts **query_options, which are
passed through to the KDTree.query call to find nearest neighbors. This
allows, for instance, to limit the neighbor search distance and parallelize
the query using the workers keyword.BarycentricInterpolator now allows computing the derivatives.CloughTocher2DInterpolator instance, while also saving the barycentric
coordinates of interpolation points.scipy.linalg improvementsdtgsyl and
stgsyl.scipy.ndimage improvementsscipy.optimize improvementsscipy.optimize.nnls is rewritten in Python and now implements the so-called
fnnls or fast nnls.scipy.optimize.root and scipy.optimize.root_scalar
now reports the method used.callback method of scipy.optimize.differential_evolution can now be
passed more detailed information via the intermediate_results keyword
parameter. Also, the evolution strategy now accepts a callable for
additional customization. The performance of differential_evolution has
also been improved.minimize method Newton-CG has been made slightly more efficient.minimize method BFGS now accepts an initial estimate for the inverse
of the Hessian, which allows for more efficient workflows in some
circumstances. The new parameter is hess_inv0.minimize methods CG, Newton-CG, and BFGS now accept parameters
c1 and c2, allowing specification of the Armijo and curvature rule
parameters, respectively.curve_fit performance has improved due to more efficient memoization
of the callable function.isotonic_regression has been added to allow nonparametric isotonic
regression.scipy.signal improvementsfreqz, freqz_zpk, and group_delay are now more accurate
when fs has a default value.ShortTimeFFT provides a more versatile implementation of the
short-time Fourier transform (STFT), its inverse (ISTFT) as well as the (cross-)
spectrogram. It utilizes an improved algorithm for calculating the ISTFT based on
dual windows and provides more fine-grained control of the parametrization especially
in regard to scaling and phase-shift. Functionality was implemented to ease
working with signal and STFT chunks. A section has been added to the "SciPy User Guide"
providing algorithmic details. The functions stft, istft and spectrogram
have been marked as legacy.scipy.sparse improvementssparse.linalg iterative solvers sparse.linalg.cg,
sparse.linalg.cgs, sparse.linalg.bicg, sparse.linalg.bicgstab,
sparse.linalg.gmres, and sparse.linalg.qmr are rewritten in Python.6.0.1, along with a few additional
fixes.eye_array,
random_array, block_array, and identity. kron and kronsum
have been adjusted to additionally support operation on sparse arrays.axes=(1, 0), to mirror
the .T method.LaplacianNd now allows selection of the largest subset of eigenvalues,
and additionally now supports retrieval of the corresponding eigenvectors.
The performance of LaplacianNd has also been improved.dok_matrix and dok_array has been improved,
and their inheritance behavior should be more robust.hstack, vstack, and block_diag now work with sparse arrays, and
preserve the input sparse type.scipy.sparse.linalg.matrix_power, has been added, allowing
for exponentiation of sparse arrays.scipy.spatial improvementsspatial.transform.Rotation:
__pow__ to raise a rotation to integer or fractional power and
approx_equal to check if two rotations are approximately equal.Rotation.align_vectors was extended to solve a constrained
alignment problem where two vectors are required to be aligned precisely.
Also when given a single pair of vectors, the algorithm now returns the
rotation with minimal magnitude, which can be considered as a minor
backward incompatible change.spatial.transform.Rotation called Davenport
angles is available through from_davenport and as_davenport methods.distance.hamming and
distance.correlation.SphericalVoronoi sort_vertices_of_regions
and two dimensional area calculations.scipy.special improvementsscipy.special.stirling2 for computation of Stirling numbers of the
second kind. Both exact calculation and an asymptotic approximation
(the default) are supported via exact=True and exact=False (the
default) respectively.scipy.special.betaincc for computation of the complementary incomplete Beta function and scipy.special.betainccinv for computation of its inverse.scipy.special.betainc and scipy.special.betaincinvscipy.special.log_ndtr, scipy.special.ndtr, scipy.special.ndtri,
scipy.special.erf, scipy.special.erfc, scipy.special.i0,
scipy.special.i0e, scipy.special.i1, scipy.special.i1e,
scipy.special.gammaln, scipy.special.gammainc, scipy.special.gammaincc,
scipy.special.logit, and scipy.special.expit now accept PyTorch tensors
and CuPy arrays. These features are still under development and likely to
contain bugs, so they are disabled by default; enable them by setting a
SCIPY_ARRAY_API environment variable to 1 before importing scipy.
Testing is appreciated!scipy.stats improvementsscipy.stats.quantile_test, a nonparametric test of whether a
hypothesized value is the quantile associated with a specified probability.
The confidence_interval method of the result object gives a confidence
interval of the quantile.scipy.stats.wasserstein_distance now computes the Wasserstein distance
in the multidimensional case.scipy.stats.sampling.FastGeneratorInversion provides a convenient
interface to fast random sampling via numerical inversion of distribution
CDFs.scipy.stats.geometric_discrepancy adds geometric/topological discrepancy
metrics for random samples.scipy.stats.multivariate_normal now has a fit method for fitting
distribution parameters to data via maximum likelihood estimation.scipy.stats.bws_test performs the Baumgartner-Weiss-Schindler test of
whether two-samples were drawn from the same distribution.scipy.stats.jf_skew_t implements the Jones and Faddy skew-t distribution.scipy.stats.anderson_ksamp now supports a permutation version of the test
using the method parameter.fit methods of scipy.stats.halfcauchy, scipy.stats.halflogistic, and
scipy.stats.halfnorm are faster and more accurate.scipy.stats.beta entropy accuracy has been improved for extreme values of
distribution parameters.sf and/or isf methods have been improved for
several distributions: scipy.stats.burr, scipy.stats.hypsecant,
scipy.stats.kappa3, scipy.stats.loglaplace, scipy.stats.lognorm,
scipy.stats.lomax, scipy.stats.pearson3, scipy.stats.rdist, and
scipy.stats.pareto.axis, nan_policy, and keep_dims: scipy.stats.entropy, scipy.stats.differential_entropy, scipy.stats.variation, scipy.stats.ansari, scipy.stats.bartlett, scipy.stats.levene, scipy.stats.fligner, scipy.stats.cirmean, scipy.stats.circvar, scipy.stats.circstd, scipy.stats.tmean, scipy.stats.tvar, scipy.stats.tstd, scipy.stats.tmin, scipy.stats.tmax, and scipy.stats.tsem`.logpdf and fit methods of scipy.stats.skewnorm have been improved.scipy.stats.betanbinom.scipy.stats.invwishart rvs and logpdf have been improved.scipy.stats.boxcox_normmax with method='mle' has been eliminated, and the returned value of lmbda is constrained such that the transformed data will not overflow.scipy.stats.nakagami stats is more accurate and reliable.scipy.norminvgauss.pdf has been eliminated.stats.circmean, stats.circvar,
stats.circstd, and stats.entropy.dirichlet has gained a new covariance (cov) method.multivariate_t entropy with large degrees of
freedom.loggamma has an improved entropy method.Error messages have been made clearer for objects that don't exist in the public namespace and warnings sharpened for private attributes that are not supposed to be imported at all.
scipy.signal.cmplx_sort has been deprecated and will be removed in
SciPy 1.14. A replacement you can use is provided in the deprecation message.
Values the the argument initial of scipy.integrate.cumulative_trapezoid
other than 0 and None are now deprecated.
scipy.stats.rvs_ratio_uniforms is deprecated in favour of
scipy.stats.sampling.RatioUniforms
scipy.integrate.quadrature and scipy.integrate.romberg have been
deprecated due to accuracy issues and interface shortcomings. They will
be removed in SciPy 1.14. Please use scipy.integrate.quad instead.
Coinciding with upcoming changes to function signatures (e.g. removal of a deprecated keyword), we are deprecating positional use of keyword arguments for the affected functions, which will raise an error starting with SciPy 1.14. In some cases, this has delayed the originally announced removal date, to give time to respond to the second part of the deprecation. Affected functions are:
linalg.{eigh, eigvalsh, pinv}integrate.simpsonsignal.{firls, firwin, firwin2, remez}sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}special.combstats.kendalltauAll wavelet functions have been deprecated, as PyWavelets provides suitable
implementations; affected functions are: signal.{daub, qmf, cascade, morlet, morlet2, ricker, cwt}
scipy.integrate.trapz, scipy.integrate.cumtrapz, and scipy.integrate.simps have
been deprecated in favour of scipy.integrate.trapezoid, scipy.integrate.cumulative_trapezoid,
and scipy.integrate.simpson respectively and will be removed in SciPy 1.14.
The tol argument of scipy.sparse.linalg.{bcg,bicstab,cg,cgs,gcrotmk,gmres,lgmres,minres,qmr,tfqmr}
is now deprecated in favour of rtol and will be removed in SciPy 1.14.
Furthermore, the default value of atol for these functions is due
to change to 0.0 in SciPy 1.14.
There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
centered keyword of scipy.stats.qmc.LatinHypercube has been removed.
Use scrambled=False instead of centered=True.scipy.stats.binom_test has been removed in favour of scipy.stats.binomtest.scipy.stats.iqr, the use of scale='raw' has been removed in favour
of scale=1.show_config.A total of 163 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.
…magnitude, which can be considered as a minor backward incompatible change.
Note: SciPy 1.12.0 is not released yet!
SciPy 1.12.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.12.x branch, and on adding new features on the main branch.
This release requires Python 3.9+ and NumPy 1.22.4 or greater.
For running on PyPy, PyPy3 6.0+ is required.
scipy.special, and to all of scipy.fft and scipy.cluster. There are
likely to be bugs and early feedback for usage with CuPy arrays, PyTorch
tensors, and other array API compatible libraries is appreciated. Use the
SCIPY_ARRAY_API environment variable for testing.ShortTimeFFT, provides a more versatile implementation of the
short-time Fourier transform (STFT), its inverse (ISTFT) as well as the (cross-)
spectrogram. It utilizes an improved algorithm for calculating the ISTFT.scipy.stats API now has improved support for handling
NaN values, masked arrays, and more fine-grained shape-handling. The
accuracy and performance of a number of stats methods have been improved,
and a number of new statistical tests and distributions have been added.scipy.cluster improvementsSCIPY_ARRAY_API environment
variable before importing scipy. This experimental support is still
under development and likely to contain bugs - testing is very welcome.scipy.fft improvementsfft array API standard extension module, as well as the
Fast Hankel Transforms and the basic FFTs which are not in the extension
module, now accept PyTorch tensors, CuPy arrays and array API compatible
array libraries. CPU arrays which can be converted to and from NumPy arrays
are supported module-wide and returned arrays will match the input type.
This behaviour is enabled by setting the SCIPY_ARRAY_API environment
variable before importing scipy. This experimental support is still under
development and likely to contain bugs - testing is very welcome.scipy.integrate improvementsscipy.integrate.cumulative_simpson for cumulative quadrature
from sampled data using Simpson's 1/3 rule.scipy.interpolate improvementsNdBSpline represents tensor-product splines in N dimensions.
This class only knows how to evaluate a tensor product given coefficients
and knot vectors. This way it generalizes BSpline for 1D data to N-D, and
parallels NdPPoly (which represents N-D tensor product polynomials).
Evaluations exploit the localized nature of b-splines.NearestNDInterpolator.__call__ accepts **query_options, which are
passed through to the KDTree.query call to find nearest neighbors. This
allows, for instance, to limit the neighbor search distance and parallelize
the query using the workers keyword.BarycentricInterpolator now allows computing the derivatives.CloughTocher2DInterpolator instance, while also saving the barycentric
coordinates of interpolation points.scipy.linalg improvementsdtgsyl and
stgsyl.scipy.ndimage improvementsscipy.optimize improvementsscipy.optimize.nnls is rewritten in Python and now implements the so-called
fnnls or fast nnls.scipy.optimize.root and scipy.optimize.root_scalar
now reports the method used.callback method of scipy.optimize.differential_evolution can now be
passed more detailed information via the intermediate_results keyword
parameter. Also, the evolution strategy now accepts a callable for
additional customization. The performance of differential_evolution has
also been improved.minimize method Newton-CG has been made slightly more efficient.minimize method BFGS now accepts an initial estimate for the inverse
of the Hessian, which allows for more efficient workflows in some
circumstances. The new parameter is hess_inv0.minimize methods CG, Newton-CG, and BFGS now accept parameters
c1 and c2, allowing specification of the Armijo and curvature rule
parameters, respectively.curve_fit performance has improved due to more efficient memoization
of the callable function.isotonic_regression has been added to allow nonparametric isotonic
regression.scipy.signal improvementsfreqz, freqz_zpk, and group_delay are now more accurate
when fs has a default value.ShortTimeFFT provides a more versatile implementation of the
short-time Fourier transform (STFT), its inverse (ISTFT) as well as the (cross-)
spectrogram. It utilizes an improved algorithm for calculating the ISTFT based on
dual windows and provides more fine-grained control of the parametrization especially
in regard to scaling and phase-shift. Functionality was implemented to ease
working with signal and STFT chunks. A section has been added to the "SciPy User Guide"
providing algorithmic details. The functions stft, istft and spectrogram
have been marked as legacy.scipy.sparse improvementssparse.linalg iterative solvers sparse.linalg.cg,
sparse.linalg.cgs, sparse.linalg.bicg, sparse.linalg.bicgstab,
sparse.linalg.gmres, and sparse.linalg.qmr are rewritten in Python.6.0.1, along with a few additional
fixes.eye_array,
random_array, block_array, and identity. kron and kronsum
have been adjusted to additionally support operation on sparse arrays.axes=(1, 0), to mirror
the .T method.LaplacianNd now allows selection of the largest subset of eigenvalues,
and additionally now supports retrieval of the corresponding eigenvectors.
The performance of LaplacianNd has also been improved.dok_matrix and dok_array has been improved,
and their inheritance behavior should be more robust.hstack, vstack, and block_diag now work with sparse arrays, and
preserve the input sparse type.scipy.sparse.linalg.matrix_power, has been added, allowing
for exponentiation of sparse arrays.scipy.spatial improvementsspatial.transform.Rotation:
__pow__ to raise a rotation to integer or fractional power and
approx_equal to check if two rotations are approximately equal.Rotation.align_vectors was extended to solve a constrained
alignment problem where two vectors are required to be aligned precisely.
Also when given a single pair of vectors, the algorithm now returns the
rotation with minimal magnitude, which can be considered as a minor
backward incompatible change.spatial.transform.Rotation called Davenport
angles is available through from_davenport and as_davenport methods.distance.hamming and
distance.correlation.SphericalVoronoi sort_vertices_of_regions
and two dimensional area calculations.scipy.special improvementsscipy.special.stirling2 for computation of Stirling numbers of the
second kind. Both exact calculation and an asymptotic approximation
(the default) are supported via exact=True and exact=False (the
default) respectively.scipy.special.betaincc for computation of the complementary incomplete Beta function and scipy.special.betainccinv for computation of its inverse.scipy.special.betainc and scipy.special.betaincinvscipy.special.log_ndtr, scipy.special.ndtr, scipy.special.ndtri,
scipy.special.erf, scipy.special.erfc, scipy.special.i0,
scipy.special.i0e, scipy.special.i1, scipy.special.i1e,
scipy.special.gammaln, scipy.special.gammainc, scipy.special.gammaincc,
scipy.special.logit, and scipy.special.expit now accept PyTorch tensors
and CuPy arrays. These features are still under development and likely to
contain bugs, so they are disabled by default; enable them by setting a
SCIPY_ARRAY_API environment variable to 1 before importing scipy.
Testing is appreciated!scipy.stats improvementsscipy.stats.quantile_test, a nonparametric test of whether a
hypothesized value is the quantile associated with a specified probability.
The confidence_interval method of the result object gives a confidence
interval of the quantile.scipy.stats.wasserstein_distance now computes the Wasserstein distance
in the multidimensional case.scipy.stats.sampling.FastGeneratorInversion provides a convenient
interface to fast random sampling via numerical inversion of distribution
CDFs.scipy.stats.geometric_discrepancy adds geometric/topological discrepancy
metrics for random samples.scipy.stats.multivariate_normal now has a fit method for fitting
distribution parameters to data via maximum likelihood estimation.scipy.stats.bws_test performs the Baumgartner-Weiss-Schindler test of
whether two-samples were drawn from the same distribution.scipy.stats.jf_skew_t implements the Jones and Faddy skew-t distribution.scipy.stats.anderson_ksamp now supports a permutation version of the test
using the method parameter.fit methods of scipy.stats.halfcauchy, scipy.stats.halflogistic, and
scipy.stats.halfnorm are faster and more accurate.scipy.stats.beta entropy accuracy has been improved for extreme values of
distribution parameters.sf and/or isf methods have been improved for
several distributions: scipy.stats.burr, scipy.stats.hypsecant,
scipy.stats.kappa3, scipy.stats.loglaplace, scipy.stats.lognorm,
scipy.stats.lomax, scipy.stats.pearson3, scipy.stats.rdist, and
scipy.stats.pareto.axis, nan_policy, and keep_dims: scipy.stats.entropy, scipy.stats.differential_entropy, scipy.stats.variation, scipy.stats.ansari, scipy.stats.bartlett, scipy.stats.levene, scipy.stats.fligner, scipy.stats.cirmean, scipy.stats.circvar, scipy.stats.circstd, scipy.stats.tmean, scipy.stats.tvar, scipy.stats.tstd, scipy.stats.tmin, scipy.stats.tmax, and scipy.stats.tsem`.logpdf and fit methods of scipy.stats.skewnorm have been improved.scipy.stats.betanbinom.scipy.stats.invwishart rvs and logpdf have been improved.scipy.stats.boxcox_normmax with method='mle' has been eliminated, and the returned value of lmbda is constrained such that the transformed data will not overflow.scipy.stats.nakagami stats is more accurate and reliable.scipy.norminvgauss.pdf has been eliminated.stats.circmean, stats.circvar,
stats.circstd, and stats.entropy.dirichlet has gained a new covariance (cov) method.multivariate_t entropy with large degrees of
freedom.loggamma has an improved entropy method.Error messages have been made clearer for objects that don't exist in the public namespace and warnings sharpened for private attributes that are not supposed to be imported at all.
scipy.signal.cmplx_sort has been deprecated and will be removed in
SciPy 1.14. A replacement you can use is provided in the deprecation message.
Values the the argument initial of scipy.integrate.cumulative_trapezoid
other than 0 and None are now deprecated.
scipy.stats.rvs_ratio_uniforms is deprecated in favour of
scipy.stats.sampling.RatioUniforms
scipy.integrate.quadrature and scipy.integrate.romberg have been
deprecated due to accuracy issues and interface shortcomings. They will
be removed in SciPy 1.14. Please use scipy.integrate.quad instead.
Coinciding with upcoming changes to function signatures (e.g. removal of a deprecated keyword), we are deprecating positional use of keyword arguments for the affected functions, which will raise an error starting with SciPy 1.14. In some cases, this has delayed the originally announced removal date, to give time to respond to the second part of the deprecation. Affected functions are:
linalg.{eigh, eigvalsh, pinv}integrate.simpsonsignal.{firls, firwin, firwin2, remez}sparse.linalg.{bicg, bicgstab, cg, cgs, gcrotmk, gmres, lgmres, minres, qmr, tfqmr}special.combstats.kendalltauAll wavelet functions have been deprecated, as PyWavelets provides suitable
implementations; affected functions are: signal.{daub, qmf, cascade, morlet, morlet2, ricker, cwt}
There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
centered keyword of stats.qmc.LatinHypercube has been removed.
Use scrambled=False instead of centered=True.show_config.A total of 161 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.11.4 is a bug-fix release with no new features compared to 1.11.3.
SciPy 1.11.4 is a bug-fix release with no new features
compared to 1.11.3.
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.11.3 is a bug-fix release with no new features compared to 1.11.2.
SciPy 1.11.3 is a bug-fix release with no new features
compared to 1.11.2.
A total of 17 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.11.2 is a bug-fix release with no new features compared to 1.11.1. Python 3.12 and musllinux wheels are provided with this release.
SciPy 1.11.2 is a bug-fix release with no new features
compared to 1.11.1. Python 3.12 and musllinux wheels
are provided with this release.
A total of 18 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.11.1 is a bug-fix release with no new features compared to 1.11.0. In particular, a licensing issue discovered after the release of 1.11.0 has
SciPy 1.11.1 is a bug-fix release with no new features
compared to 1.11.0. In particular, a licensing issue
discovered after the release of 1.11.0 has been addressed.
A total of 4 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.
…documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgra…
SciPy 1.11.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.11.x branch, and on adding new features on the main branch.
This release requires Python 3.9+ and NumPy 1.21.6 or greater.
For running on PyPy, PyPy3 6.0+ is required.
scipy.sparse array API improvements, including sparse.sparray, a new
public base class distinct from the older sparse.spmatrix class,
proper 64-bit index support, and numerous deprecations paving the way to a
modern sparse array experience.scipy.stats added tools for survival analysis, multiple hypothesis testing,
sensitivity analysis, and working with censored data.det and lu now accept nD-arrays.axes argument was added broadly to ndimage functions, facilitating
analysis of stacked image data.scipy.integrate improvementsscipy.integrate.qmc_quad for quasi-Monte Carlo integration.scipy.integrate.simpson now calculates
a parabolic segment over the last three points which gives improved
accuracy over the previous implementation.scipy.cluster improvementsdisjoint_set has a new method subset_size for providing the size
of a particular subset.scipy.constants improvementsquetta, ronna, ronto, and quecto SI prefixes were added.scipy.linalg improvementsscipy.linalg.det is improved and now accepts nD-arrays.scipy.linalg.lu is improved and now accepts nD-arrays. With the new
p_indices switch the output permutation argument can be 1D (n,)
permutation index instead of the full (n, n) array.scipy.ndimage improvementsaxes argument was added to rank_filter, percentile_filter,
median_filter, uniform_filter, minimum_filter,
maximum_filter, and gaussian_filter, which can be useful for
processing stacks of image data.scipy.optimize improvementsscipy.optimize.linprog now passes unrecognized options directly to HiGHS.scipy.optimize.root_scalar now uses Newton's method to be used without
providing fprime and the secant method to be used without a second
guess.scipy.optimize.lsq_linear now accepts bounds arguments of type
scipy.optimize.Bounds.scipy.optimize.minimize method='cobyla' now supports simple bound
constraints.scipy.optimize.minimize: If the provided callback callable accepts
a single keyword argument, intermediate_result, scipy.optimize.minimize
now passes both the current solution and the optimal value of the objective
function to the callback as an instance of scipy.optimize.OptimizeResult.
It also allows the user to terminate optimization by raising a
StopIteration exception from the callback function.
scipy.optimize.minimize will return normally, and the latest solution
information is provided in the result object.scipy.optimize.curve_fit now supports an optional nan_policy argument.scipy.optimize.shgo now has parallelization with the workers argument,
symmetry arguments that can improve performance, class-based design to
improve usability, and generally improved performance.scipy.signal improvementsistft has an improved warning message when the NOLA condition fails.scipy.sparse improvementsscipy.sparse.sparray was introduced, allowing further
extension of the sparse array API (such as the support for 1-dimensional
sparse arrays) without breaking backwards compatibility.
isinstance(x, scipy.sparse.sparray) to select the new sparse array classes,
while isinstance(x, scipy.sparse.spmatrix) selects only the old sparse
matrix classes.scipy.sparse.isspmatrix now only returns True for the sparse matrices instances.
scipy.sparse.issparse now has to be used instead to check for instances of sparse
arrays or instances of sparse matrices.argmin and argmax methods now return the correct result when explicit
zeros are present.scipy.sparse.linalg improvementsLinearOperator by a number now returns a
_ScaledLinearOperatorLinearOperator now supports right multiplication by arrayslobpcg should be more efficient following removal of an extraneous
QR decomposition.scipy.spatial improvementsscipy.special improvementsfactorial, factorial2 and factorialk
were made consistent in their behavior (in terms of dimensionality,
errors etc.). Additionally, factorial2 can now handle arrays with
exact=True, and factorialk can handle arrays.scipy.stats improvementsscipy.stats.sobol_indices, a method to compute Sobol' sensitivity indices.scipy.stats.dunnett, which performs Dunnett's test of the means of multiple
experimental groups against the mean of a control group.scipy.stats.ecdf for computing the empirical CDF and complementary
CDF (survival function / SF) from uncensored or right-censored data. This
function is also useful for survival analysis / Kaplan-Meier estimation.scipy.stats.logrank to compare survival functions underlying samples.scipy.stats.false_discovery_control for adjusting p-values to control the
false discovery rate of multiple hypothesis tests using the
Benjamini-Hochberg or Benjamini-Yekutieli procedures.scipy.stats.CensoredData to represent censored data. It can be used as
input to the fit method of univariate distributions and to the new
ecdf function.method='Filliben' of
scipy.stats.goodness_of_fit.scipy.stats.ttest_ind has a new method, confidence_interval for
computing a confidence interval of the difference between means.scipy.stats.MonteCarloMethod, scipy.stats.PermutationMethod, and
scipy.stats.BootstrapMethod are new classes to configure resampling and/or
Monte Carlo versions of hypothesis tests. They can currently be used with
scipy.stats.pearsonr.Added the von-Mises Fisher distribution as scipy.stats.vonmises_fisher.
This distribution is the most common analogue of the normal distribution
on the unit sphere.
Added the relativistic Breit-Wigner distribution as
scipy.stats.rel_breitwigner.
It is used in high energy physics to model resonances.
Added the Dirichlet multinomial distribution as
scipy.stats.dirichlet_multinomial.
Improved the speed and precision of several univariate statistical distributions.
scipy.stats.anglit sfscipy.stats.beta entropyscipy.stats.betaprime cdf, sf, ppfscipy.stats.chi entropyscipy.stats.chi2 entropyscipy.stats.dgamma entropy, cdf, sf, ppf, and isfscipy.stats.dweibull entropy, sf, and isfscipy.stats.exponweib sf and isfscipy.stats.f entropyscipy.stats.foldcauchy sfscipy.stats.foldnorm cdf and sfscipy.stats.gamma entropyscipy.stats.genexpon ppf, isf, rvsscipy.stats.gengamma entropyscipy.stats.geom entropyscipy.stats.genlogistic entropy, logcdf, sf, ppf,
and isfscipy.stats.genhyperbolic cdf and sfscipy.stats.gibrat sf and isfscipy.stats.gompertz entropy, sf. and isfscipy.stats.halflogistic sf, and isfscipy.stats.halfcauchy sf and isfscipy.stats.halfnorm cdf, sf, and isfscipy.stats.invgamma entropyscipy.stats.invgauss entropyscipy.stats.johnsonsb pdf, cdf, sf, ppf, and isfscipy.stats.johnsonsu pdf, sf, isf, and statsscipy.stats.lognorm fitscipy.stats.loguniform entropy, logpdf, pdf, cdf, ppf,
and statsscipy.stats.maxwell sf and isfscipy.stats.nakagami entropyscipy.stats.powerlaw sfscipy.stats.powerlognorm logpdf, logsf, sf, and isfscipy.stats.powernorm sf and isfscipy.stats.t entropy, logpdf, and pdfscipy.stats.truncexpon sf, and isfscipy.stats.truncnorm entropyscipy.stats.truncpareto fitscipy.stats.vonmises fitscipy.stats.multivariate_t now has cdf and entropy methods.
scipy.stats.multivariate_normal, scipy.stats.matrix_normal, and
scipy.stats.invwishart now have an entropy method.
scipy.stats.monte_carlo_test now supports multi-sample statistics.scipy.stats.bootstrap can now produce one-sided confidence intervals.scipy.stats.rankdata performance was improved for method=ordinal and
method=dense.scipy.stats.moment now supports non-central moment calculation.scipy.stats.anderson now supports the weibull_min distribution.scipy.stats.sem and scipy.stats.iqr now support axis, nan_policy,
and masked array input.asfptype, getrow,
getcol, get_shape, getmaxprint, set_shape,
getnnz, and getformat. Additionally, the .A and .H
attributes were deprecated. Sparse matrix types are not affected.scipy.linalg functions tri, triu & tril are deprecated and
will be removed in SciPy 1.13. Users are recommended to use the NumPy
versions of these functions with identical names.scipy.signal functions bspline, quadratic & cubic are
deprecated and will be removed in SciPy 1.13. Users are recommended to use
scipy.interpolate.BSpline instead.even keyword of scipy.integrate.simpson is deprecated and will be
removed in SciPy 1.13.0. Users should leave this as the default as this
gives improved accuracy compared to the other methods.exact=True when passing integers in a float array to factorial
is deprecated and will be removed in SciPy 1.13.0.scipy.signal.medfilt and
scipy.signal.order_filterscipy.signal.{lsim2, impulse2, step2} had long been
deprecated in documentation only. They now raise a DeprecationWarning and
will be removed in SciPy 1.13.0.scipy.window has been soft
deprecated since SciPy 1.1.0. They now raise a DeprecationWarning and
will be removed in SciPy 1.13.0. Users should instead import them from
scipy.signal.window or use the convenience function
scipy.signal.get_window.legacy keyword of scipy.special.comb has changed
from True to False, as announced since its introduction.There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:
n keyword has been removed from scipy.stats.moment.alpha keyword has been removed from scipy.stats.interval.gilbrat distribution has been removed (use
scipy.stats.gibrat).kulsinski distance metric has been
removed (use scipy.spatial.distance.kulczynski1).vertices keyword of scipy.spatial.Delauney.qhull has been removed
(use simplices).residual property of scipy.sparse.csgraph.maximum_flow has been
removed (use flow).extradoc keyword of scipy.stats.rv_continuous,
scipy.stats.rv_discrete and scipy.stats.rv_sample has been removed.sym_pos keyword of scipy.linalg.solve has been removed.scipy.optimize.minimize function now raises an error for x0 with
x0.ndim > 1.scipy.stats.mode, the default value of keepdims is now False,
and support for non-numeric input has been removed.scipy.signal.lsim does not support non-uniform time steps
anymore.A total of 134 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.
Your coding agent can read these notes before it upgrades. Set up the MCP server →