SciPy 1.17.0 Release Notes
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.
Highlights of this release
- Many SciPy functions have gained native support for batching of N-dimensional
array input and additional support for the array API standard. An overall
summary of the latter is now available in a set of tables. - In
scipy.sparse,coo_arraynow 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. - In
scipy.spatial,transform.Rotationandtransform.RigidTransform
have been extended to support N-D arrays.geometric_slerpnow has support
for extrapolation. scipy.statshas gained the matrix t and logistic distributions and many
performance and accuracy improvements.- Initial support for 64-bit integer (ILP64) BLAS and LAPACK libraries has
been added, including for MKL, Apple Accelerate and OpenBLAS. Please
report any issues with ILP64 you encounter.
New features
scipy.integrate improvements
- The integration routines
dopri5,dopri853,LSODA,vode, and
zvodehave been ported from Fortran77 to C. scipy.integrate.quadnow has a fast path for returning 0 when the integration
interval is empty.
scipy.cluster improvements
scipy.cluster.hierarchy.is_isomorphichas improved performance and array
API support.
scipy.interpolate improvements
- A new
bc_typeargument has been added toscipy.interpolate.make_splrep
andscipy.interpolate.make_splprepto control the boundary conditions for
spline fitting. Allowed values are"not-a-knot"(default) and
"periodic". - A new
derivativemethod has been added to the
scipy.interpolate.NdBSplineclass, to construct a new spline representing a
partial derivative of the given spline. This method is similar to the
BSpline.derivativemethod of 1-D spline objects. - Performance of
"cubic"and"quintic"modes of
scipy.interpolate.RegularGridInterpolatorhas been improved. - Numerical stability of
scipy.interpolate.AAAhas been improved. scipy.interpolate.FloaterHormannInterpolatoradded support for
multidimensional, batched inputs and gained a newaxisparameter to
select the interpolation axis.
scipy.linalg improvements
-
scipy.linalg.invroutine has been improved:- it now attempts to detect the structure of its argument and selects an
appropriate low-level matrix inversion routine. A newassume_akeyword
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 forassume_ais provided (in which case, the structure is
assumed to be the same for all 2-D slices of the batch); - the new
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 ofscipy.linalg.invfor details; - the routine emits a
LinAlgWarningif it detects an ill-conditioned
input; - performance for batched inputs has been improved.
- it now attempts to detect the structure of its argument and selects an
-
scipy.linalg.fiedlerhas gained native support for batched inputs. -
performance has improved for
scipy.linalg.solvewith batched inputs
for certain matrix structures.
scipy.optimize improvements
optimize.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.- Callback functions used by
optimize.minimize(method="slsqp")can
opt into the new callback interface by accepting a single keyword argument
intermediate_result.
scipy.signal improvements
scipy.signal.abcd_normalizegained more informative error messages and the
documentation was improved.scipy.signal.get_windownow accepts the suffixes'_periodic'and
'_symmetric'to distinguish between periodic and symmetric windows
(overriding thefftbinparameter). This benefits the functions
coherence,csd,periodogram,welch,spectrogram,
stft,istft,resample,resample_poly,firwin,
firwin2,firwin_2d,check_COLAandcheck_NOLA, which utilize
get_windowbut do not expose thefftbinparameter.scipy.signal.hilbert2gained the new keywordaxesfor specifying the
axes along which the two-dimensional analytic signal should be calculated.
Furthermore, the documentation ofscipy.signal.hilbertand
scipy.signal.hilbert2was significantly improved.
scipy.sparse improvements
coo_arraynow 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.- Additional sparse construction functions include
expand_dims,
swapaxes,permute_dims, and nD support for thekronfunction. - ARPACK Fortran77 library is ported to C. Among many changes, it is now
possible to use external random generators including NumPy PRNGs for
reproducible runs. Previously this was not the case due to internal seeding
behavior of the original ARPACK code. - Similarly, PROPACK Fortran77 library is also ported to C with the same PRNG
enhancements and other improvements. scipy.sparse.dok_arraynow supports anupdatemethod which can be
used to update the sparse array using a dict,dict.items()-like iterable,
or anotherdok_arraymatrix. It performs additional validation that keys
are valid index tuples.scipy.sparse.dia_array.tocsris approximately three times faster and
some unneccesary copy operations have been removed from sparse format
interconversions more broadly.- Added
scipy.sparse.linalg.funm_multiply_krylov, a restarted Krylov method
for evaluatingy = f(tA) b.
scipy.spatial improvements
-
The
spatial.transformmodule has gained an array API standard compatible
backend. -
transform.Rotationandtransform.RigidTransformhave 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:- A
shapeproperty. - A
shapeargument to theiridentity()constructors, which should be
preferred over the existingnumargument. This has also been added as an
argument forRotation.random()(RigidTransformdoes not currently
have arandomconstructor). - An
axisargument to theirmean()functions.
- A
-
The resulting shapes for
transform.Rotation.from_euler/
from_davenporthave 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 resultingRotationhas 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 resultingRotation
has the shapenp.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]). -
Rotation.from_matrixhas gained anassume_validargument that allows for
performance improvements when users can guarantee valid matrix inputs.
from_matrixis now also faster in cases where a known orthogonal matrix
is used. -
The
scipy.spatial.geometric_slerpfunction 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 withstartbeing a point on the equator, andend
being a point at the north pole, then a value oft=-1would give you a
point at the south pole. -
Rotation.as_eulerandRotation.as_davenportmethods have gained a
suppress_warningsparameter to enable suppression of gimbal lock warnings.
scipy.special improvements
- The following functions for statistical applications have significantly
improved parameter ranges and reduced error rates:btdtria,btdtrib,
chdtriv,chndtr,chndtrix,chndtridf,chndtrinc,fdtr,
fdtrc,fdtri,gdtria,gdtrix,pdtrik,stdtrand
stdtrit. - The incomplete beta functions
betainc,betaincc,betaincinvand
betainccinvare improved for extreme parameter ranges.
scipy.stats improvements
scipy.stats.matrix_thas been added to represent the matrix t distribution.
It supports methodspdf(andlogpdf) for computing the probability
density function andrvsfor generating random variates.scipy.stats.Logisticwas added for modeling random variables that follow a
logistic distribution.scipy.stats.quantilenow accepts aweightsargument to specify
frequency weights.scipy.stats.quantileis now faster on large arrays as it no longer uses
stable sort internally.scipy.stats.quantilesupports three new values of themethodargument,
'round_inward','round_outward', and'round_neareast', for use in
the context of trimming and winsorizing data.scipy.stats.truncparetonow accepts negative values for the exponent shape
parameter, enabling use oftruncparetoas a more general power law
distribution.scipy.stats.logsernow provides a distribution-specific implementation of
thesfmethod, improving speed and accuracy.- Implementations of the following function have been vectorized:
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, andscipy.stats.mood.
Typically, this improves performance with multidimensional (batch) input. - The critical value tables of
scipy.stats.andersonhave been updated. - The speed and accuracy of most
scipy.stats.zipfianmethods has been
improved. - The accuracies of the
scipy.stats.Binomialmethodslogcdfand
logccdfhave been improved in the tails. - The default guess of
scipy.stats.trapezoid.fithas been improved. - The accuracy and range of the
cdf,sf,isf, andppfmethods
ofscipy.stats.binomandscipy.stats.nbinomhas been improved.
Array API Standard Support
- An overall summary table for our array API standard support/coverage is now available
- The overhead associated with array namespace determination has been reduced,
providing improved performance in dispatching to different backends. scipy.cluster.hierarchy.is_isomorphichas gained support.scipy.interpolate.make_lsq_spline,scipy.interpolate.make_smoothing_spline,
scipy.interpolate.make_splrep,scipy.interpolate.make_splprep,
scipy.interpolate.generate_knots, andscipy.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, andscipy.signal.group_delayhave 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, andscipy.signal.ellipordhave gained support.scipy.signal.savgol_filter,scipy.signal.savgol_coeffs, and
scipy.signal.abcd_normalizehave gained support.spatial.transformhas gained support.scipy.integrate.qmc_quad,scipy.integrate.cumulative_simpson,
scipy.integrate.cumulative_trapezoid, andscipy.integrate.rombhave
gained support.scipy.linalg.block_diag,scipy.linalg.fiedler, and
scipy.linalg.orthogonal_procrusteshave gained support.scipy.interpolate.BSpline,scipy.interpolate.NdBSpline,
scipy.interpolate.RegularGridInterpolator, and
scipy.interpolate.RBFInterpolatorgained support.- Support added for
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, andscipy.stats.yeojohnson_llf. scipy.stats.pearsonrhas gained support for JAX and Dask backends.scipy.stats.variationhas gained support for the Dask backend.marraysupport was added forstats.gtstd,stats.directional_stats,
stats.bartlett,stats.variation,stats.pearsonr, and
stats.entropy.
Deprecated features and future changes
- The
scipy.odrmodule is deprecated in v1.17.0 and will be completely
removed in v1.19.0. Users are suggested to use theodrpackpackage instead. - The default dype behavior of
scipy.sparse.diagsand
scipy.sparse.diags_arraywill change in v1.19.0. - In v1.19.0,
scipy.linalg.hankelwill no longer ravel multidimensional
inputs and instead will treat them as a batch. - The
precenterargument ofscipy.signal.lombscargleis deprecated and
will be removed in v1.19.0. Furthermore, some arguments will become keyword
only.
Expired deprecations
scipy.stats.find_repeatshas been removed. Please use
numpy.unique/numpy.unique_countsinstead.scipy.linalgfunctions for Toeplitz matrices no longer ravel n-d input
arguments; instead, multidimensional input is treated as a batch.- The
seedandrandfunctions fromscipy.linalg.interpolativehave
been removed. Use therngargument instead. - Complex inputs to
scipy.spatial.distance.cosineand
scipy.spatial.distance.correlationnow raise an error. - Support for object arrays and longdoubles has been removed from
scipy.signal.correlate,scipy.signal.convolve,scipy.signal.lfilter,
andscipy.signal.sosfilt. kulczynski1andsokalmichenerhave been removed from
scipy.spatial.distance.kronhas been removed fromscipy.linalg. Please usenumpy.kron.- Accidentally exposed functions have been removed from
scipy.interpolate.interpnd. - The
random_stateandpermutationarguments of
scipy.stats.ttest_indhave been removed. sph_harm,clpmn,lpn, andlpmnhave been removed from
scipy.special.
Backwards incompatible changes
- The resulting shapes for
transform.Rotation.from_euler/
from_davenporthave 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 resultingRotationhas 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 resultingRotation
has the shapenp.broadcast_shapes(np.atleast_2d(axes).shape[:-2], np.atleast_1d(angles).shape[:-1]).
Other changes
-
The version of the Boost Math library leveraged by SciPy has been
increased from1.88.0to1.89.0. -
On POSIX operating systems, SciPy will now use the
'forkserver'
multiprocessing context on Python 3.13 and older forworkers=<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=truemeson 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 thescipy-openblas64package. Note that:- the ILP64 support is optional, and is in addition to the always-available
LP64 interface; - at runtime, you can select the ILP64 variants via the
get_{blas,lapack}_funcsfunctions:
scipy.linalg.lapack.get_lapack_funcs(..., use_ilp64="preferred")selects
the ILP64 variant if available and LP64 variant otherwise; cython_blasandcython_lapackmodules always contain the LP64
routines for ABI compatibility.
- the ILP64 support is optional, and is in addition to the always-available
Please report any issues with ILP64 you encounter.
Authors
- Name (commits)
- h-vetinari (3)
- Joshua Alexander (1) +
- Amit Aronovitch (1) +
- Ayush Baranwal (1) +
- Cristrian Batrin (1) +
- Marco Berzborn (1) +
- Ole Bialas (1) +
- Om Biradar (1) +
- Florian Bourgey (1)
- Jake Bowhay (102)
- Matteo Brivio (1) +
- Dietrich Brunn (34)
- Johannes Buchner (2) +
- Evgeni Burovski (288)
- Nicholas Carlini (1) +
- Luca Cerina (1) +
- Christine P. Chai (35)
- Saransh Chopra (1)
- Lucas Colley (117)
- Björn Ingvar Dahlgren (2) +
- Sumit Das (1) +
- Hans Dembinski (1)
- John M Dusel (1) +
- DWesl (4)
- Pieter Eendebak (6)
- Kian Eliasi (2)
- Rob Falck (1)
- Abdullah Fayed (3) +
- Emmanuel Ferdman (2) +
- Filipe Laíns (1) +
- Daniel Fremont (1) +
- Neil Girdhar (1)
- Ilan Gold (35)
- Nathan Goldbaum (3) +
- Ralf Gommers (121)
- Nicolas Guidotti (1) +
- Geoffrey Gunter (1) +
- Matt Haberland (177)
- Joren Hammudoglu (56)
- Jacob Hass (2) +
- Nick Hodgskin (1) +
- Stephen Huan (1) +
- Guido Imperiale (41)
- Gert-Ludwig Ingold (1)
- Jaime Rodríguez-Guerra (2) +
- JBlitzar (1) +
- Adam Jones (2)
- Dustin Kenefake (1) +
- Robert Kern (3)
- Gleb Khmyznikov (1) +
- Daniil Kiktenko (1) +
- Pascal Klein (2) +
- kleiter (1) +
- Oliver Kovacs (1) +
- Koven (1) +
- Abhishek Kumar (2) +
- Arthur Lacote (2) +
- Eric Larson (7)
- Mouad Leachouri (1) +
- Tristan Leclercq (1) +
- Antony Lee (5)
- Jesse Livezey (8)
- Philip Loche (1)
- Yuxi Long (4) +
- Christian Lorentzen (1)
- Joshua Markovic (1) +
- Gabryel Mason-Williams (1) +
- mcdigman (1) +
- Rafael Menezes (1) +
- Stefano Miccoli (1) +
- Michał Górny (2)
- Jost Migenda (7) +
- Suriyaa MM (1) +
- Andrew Nelson (72)
- newyork_loki (2) +
- Nick ODell (33)
- Dimitri Papadopoulos Orfanos (2)
- Drew Parsons (1)
- Gilles Peiffer (3) +
- Matti Picus (1)
- Jonas Pleyer (2) +
- Ilhan Polat (116)
- Akshay Priyadarshi (2) +
- Mohammed Abdul Rahman (1) +
- Daniele Raimondi (2) +
- Ritesh Rana (1) +
- Adrian Raso (1) +
- Dan Raviv (1) +
- Tyler Reddy (116)
- Lucas Roberts (4)
- Bernard Roesler (1) +
- Mikhail Ryazanov (27)
- Jaro Schmidt (1) +
- Daniel Schmitz (25)
- Martin Schuck (25)
- Dan Schult (29)
- Mugunthan Selvanayagam (1) +
- Scott Shambaugh (14)
- Rodrigo Silva (1) +
- Samaresh Kumar Singh (8) +
- Kartik Sirohi (1) +
- Albert Steppi (178)
- Matthias Straka (1) +
- Theo Teske (1) +
- Noam Teyssier (1) +
- tommie979 (1) +
- Christian Veenhuis (1)
- Pierre Veron (1) +
- Shuhei Watanabe (1) +
- Warren Weckesser (25)
- WhimsyHippo (7) +
- Rory Yorke (2)
- Will Zhang (1) +
- Eric Zitong Zhou (1)
- Tingwei Zhu (1) +
- Zhenyu Zhu (1) +
- ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) (38)
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.