scipy/scipy: SciPy 1.16.0
Authors/Creators
- Ralf Gommers1
- Pauli Virtanen
- Matt Haberland
- Evgeni Burovski
- Tyler Reddy2
- Warren Weckesser
- Travis E. Oliphant3
- Andrew Nelson
- David Cournapeau4
- alexbrc
- Pamphile Roy
- Ilhan Polat5
- Pearu Peterson6
- Josh Wilson
- endolith
- Nikolay Mayorov
- Lucas Colley7
- Stefan van der Walt8
- Matthew Brett
- Jake Bowhay7
- Denis Laxalde
- Eric Larson9
- Atsushi Sakai
- Jarrod Millman10
- Albert Steppi1
- Lars
- peterbell1011
- CJ Carey12
- Paul van Mulbregt12
- eric-jones
- 1. Quansight
- 2. LANL
- 3. Quansight, OpenTeams
- 4. AMAZON JP
- 5. Sandvik
- 6. OpenTeams
- 7. University of Oxford
- 8. University of California, Berkeley
- 9. University of Washington
- 10. UC Berkeley
- 11. OpenAI
- 12. Google
Description
SciPy 1.16.0 Release Notes
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.
Highlights of this release
- Improved experimental support for the Python array API standard, including
new support in
scipy.signal, and additional support inscipy.statsandscipy.special. Improved support for JAX and Dask backends has been added, with notable support inscipy.cluster.hierarchy, many functions inscipy.special, and many of the trimmed statistics functions. scipy.optimizenow uses the new Python implementation from thePRIMApackage for COBYLA. The PRIMA implementation fixes many bugs in the old Fortran 77 implementation with a better performance on average.scipy.sparse.coo_arraynow supports n-D arrays with reshaping, arithmetic and reduction operations like sum/mean/min/max. No n-D indexing orscipy.sparse.random_arraysupport yet.- Updated guide and tools for migration from sparse matrices to sparse arrays.
- Nearly all functions in the
scipy.linalgnamespace that accept array arguments now support N-dimensional arrays to be processed as a batch. - Two new
scipy.signalfunctions,scipy.signal.firwin_2dandscipy.signal.closest_STFT_dual_window, for creation of a 2-D FIR filter andscipy.signal.ShortTimeFFTdual window calculation, respectively. - A new class,
scipy.spatial.transform.RigidTransform, provides functionality to convert between different representations of rigid transforms in 3-D space. - A new function
scipy.ndimage.vectorized_filterfor generic filters that take advantage of a vectorized Python callable was added.
New features
scipy.io improvements
scipy.io.savematnow provides informative warnings for invalid field names.scipy.io.mmreadnow provides a clearer error message when provided with a source file path that does not exist.scipy.io.wavfile.readcan now read non-seekable files.
scipy.integrate improvements
- The error estimate of
scipy.integrate.tanhsinhwas improved.
scipy.interpolate improvements
- Batch support was added to
scipy.interpolate.make_smoothing_spline.
scipy.linalg improvements
- Nearly all functions in the
scipy.linalgnamespace that accept array arguments now support N-dimensional arrays to be processed as a batch. Seelinalg_batchfor details. scipy.linalg.sqrtmis 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 argumentdispand the optional output argumenterrestare deprecated and will be removed four versions later. Similarly, after changing the underlying algorithm to recursion, theblocksizekeyword argument has no effect and will be removed two versions later.- Wrappers for
?stevd,?langb,?sytri,?hetriand?gbconwere added toscipy.linalg.lapack. - The default driver of
scipy.linalg.eigh_tridiagonalwas improved. scipy.linalg.solvecan now estimate the reciprocal condition number and the matrix norm calculation is more efficient.
scipy.ndimage improvements
- A new function
scipy.ndimage.vectorized_filterfor generic filters that take advantage of a vectorized Python callable was added. scipy.ndimage.rotatehas improved performance, especially on ARM platforms.
scipy.optimize improvements
- COBYLA was updated to use the new Python implementation from the
PRIMApackage. 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 byrhobegandtolrespectively. A largerrhobegcan help the algorithm take bigger steps initially, while a smallertolcan help it continue and find a better solution. For more information, see the PRIMA documentation. - Several of the
scipy.optimize.minimizemethods, and thescipy.optimize.least_squaresfunction, have been given aworkerskeyword. This allows parallelization of some calculations via a map-like callable, such asmultiprocessing.Pool. These parallelization opportunities typically occur during numerical differentiation. This can greatly speed up minimization when the objective function is expensive to calculate. - The
lmmethod ofscipy.optimize.least_squarescan now accept3-pointandcsfor thejackeyword. - 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
multiplierkeyword of the returnedscipy.optimize.OptimizeResultobject. - NNLS code has been corrected and rewritten in C to address the performance regression introduced in 1.15.x
scipy.optimize.rootnow warns for invalid inner parameters when using thenewton_krylovmethod- The return value of minimization with
method='L-BFGS-B'now has a fasterhess_inv.todense()implementation. Time complexity has improved from cubic to quadratic. scipy.optimize.least_squareshas a newcallbackargument that is applicable to thetrfanddogboxmethods.callbackmay be used to track optimization results at each step or to provide custom conditions for stopping.
scipy.signal improvements
- A new function
scipy.signal.firwin_2dfor the creation of a 2-D FIR Filter using the 1-D window method was added. scipy.signal.cspline1d_evalandscipy.signal.qspline1d_evalnow provide an informative error on empty input rather than hitting the recursion limit.- A new function
scipy.signal.closest_STFT_dual_windowto calculate thescipy.signal.ShortTimeFFTdual window of a given window closest to a desired dual window. - A new classmethod
scipy.signal.ShortTimeFFT.from_win_equals_dualto create ascipy.signal.ShortTimeFFTinstance 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.convolve2dwas improved.
scipy.sparse improvements
scipy.sparse.coo_arraynow supports n-D arrays using binary and reduction operations.- Faster operations between two DIA arrays/matrices for: add, sub, multiply, matmul.
scipy.sparse.csgraph.dijkstrashortest_path is more efficient.scipy.sparse.csgraph.yenhas performance improvements.- Support for lazy loading of
sparse.csgraphandsparse.linalgwas added.
scipy.spatial improvements
- 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 asscipy.spatial.transform.Rotation. scipy.spatial.transform.Rotationnow has an appropriate__repr__method, and improved performance for itsscipy.spatial.transform.Rotation.applymethod.
scipy.stats improvements
- A new function
scipy.stats.quantile, an array API compatible function for quantile estimation, was added. scipy.stats.make_distributionwas 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_varkeyword was added toscipy.stats.tukey_hsd(enables the Games-Howell test) andscipy.stats.f_oneway(enables Welch ANOVA). - The moment calculation for
scipy.stats.gennormwas improved. - The
scipy.stats.modeimplementation was vectorized, for faster batch calculation. - Support for
axis,nan_policy, andkeepdimskeywords was added toscipy.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, andscipy.stats.linregress. - Support for
keepdimsandnan_policykeywords was added toscipy.stats.gstd. - The performance of
scipy.stats.special_ortho_groupandscipy.stats.pearsonrwas improved. - Support for an
rngkeyword argument was added to thelogcdfandcdfmethods ofmultivariate_normal_genandmultivariate_normal_frozen.
Array API Standard Support
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.signalfunctionality scipy.ndimage.vectorized_filterscipy.special.stdtritscipy.special.softmaxscipy.special.log_softmaxscipy.stats.quantilescipy.stats.gstdscipy.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.hierarchyfunctions - 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.
Deprecated features
- The unused
atolargument ofscipy.optimize.nnlsis deprecated and will be removed in SciPy 1.18.0. - The
dispargument ofscipy.linalg.signm,scipy.linalg.logm, andscipy.linalg.sqrtmwill be removed in SciPy 1.18.0. scipy.stats.multinomialnow emits aFutureWarningif the rows ofpdo not sum to1.0. This condition will produce NaNs beginning in SciPy 1.18.0.- The
dispandiprintarguments of thel-bfgs-bsolver ofscipy.optimizehave been deprecated, and will be removed in SciPy 1.18.0.
Expired Deprecations
scipy.sparse.conjtransphas been removed. Use.T.conj()instead.- The
quadrature='trapz'option has been removed fromscipy.integrate.quad_vec, andscipy.stats.trapzhas been removed. Usetrapezoidin both instances instead. scipy.special.combandscipy.special.permnow raise whenexact=Trueand arguments are non-integral.- Support for inference of the two sets of measurements from the single
argument
xhas been removed fromscipy.stats.linregress. The data must be specified separately asxandy. - Support for NumPy masked arrays has been removed from
scipy.stats.power_divergenceandscipy.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.
Backwards incompatible changes
- Several of the
scipy.linalgfunctions 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 inlinalg_batch. scipy.stats.bootstrapnow explicitly broadcasts elements ofdatato the same shape (ignoringaxis) 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.
Build and packaging related changes
- 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 newcython --generate-sharedfunctionality, 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_statewas removed fromscipy.special. - A new build option
-Duse-system-librarieshas been added. It allows opting in to using system libraries instead of using vendored sources. CurrentlyBoost.MathandQhullare supported as system build dependencies.
Other changes
- A new accompanying release of
scipy-stubs(v1.16.0.0) is available at https://github.com/scipy/scipy-stubs/releases/tag/v1.16.0.0 - The internal dependency of
scipy._libonscipy.sparsewas 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.specialwere fixed, andpytest-run-parallelis now used in a CI job to guard against regressions. - Support for
spinas a developer CLI was added, including support for editable installs. The SciPy-specificpython dev.pyCLI will be removed in the next release cycle in favor ofspin. - The vendored Qhull library was upgraded from version 2019.1 to 2020.2.
- A large amount of the C++ code in
scipy.specialwas moved to the new header-onlyxsflibrary. 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 thepolarslibrary. - The output of the
rvsmethod ofscipy.stats.wrapcauchyis now mapped to the unit circle between 0 and2 * pi. - The
lmmethod ofscipy.optimize.least_squaresnow has a different behavior for the maximum number of function evaluations,max_nfev. The default for thelmmethod is changed to100 * 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 was100 * n * (n + 1), because the method included evaluations used in the estimation. In addition, for thelmmethod the number of function calls used in Jacobian approximation is no longer included inOptimizeResult.nfev. This brings the behavior oflm,trf, anddogboxinto line.
Authors
- 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 (127)
- Matthew Brett (1)
- Dietrich Brunn (53)
- Evgeni Burovski (254)
- 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 (162)
- Rohit Goswami (4)
- Saarthak Gupta (4) +
- Matt Haberland (326)
- Sasha Hafner (1) +
- Joren Hammudoglu (11)
- Chengyu Han (1) +
- Charles Harris (1)
- Kim Hsieh (4) +
- Yongcai Huang (2) +
- Lukas Huber (1) +
- Yuji Ikeda (2) +
- Guido Imperiale (105) +
- Robert Kern (2)
- Harin Khakhi (2) +
- Agriya Khetarpal (4)
- Daniil Kiktenko (1) +
- 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) +
- Yuxi Long (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 (74)
- Tyler Reddy (128)
- É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 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.
Files
scipy/scipy-v1.16.0.zip
Files
(26.0 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:d4b0c626582f69e881b16a2c8e14f589
|
26.0 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/scipy/scipy/tree/v1.16.0 (URL)
Software
- Repository URL
- https://github.com/scipy/scipy