scipy/scipy: SciPy 1.18.0rc2

Read full text
Authors: Ralf Gommers, Pauli Virtanen, Matt Haberland, Evgeni Burovski, Tyler Reddy, Warren Weckesser, Andrew Nelson, Travis E. Oliphant, David Cournapeau, Ilhan Polat, alexbrc, Pamphile Roy
+18 more Lucas Colley, Pearu Peterson, Josh Wilson, Jake Bowhay, endolith, Nikolay Mayorov, Albert Steppi, Stefan van der Walt, Matthew Brett, Denis Laxalde, Eric Larson, Atsushi Sakai, Jarrod Millman, Lars, peterbell10, CJ Carey, Paul van Mulbregt, Daniel Schmitz
Cited by: 1

Abstract

SciPy 1.18.0 Release Notes 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. Highlights of this release SciPy now supports three different build modes for BLAS and LAPACK LP64/ILP64 support, and machinery is provided for downstream cython_lapack consumers to gracefully handle LP64/ILP64 backend builds. ILP64 support has been substantially improved across the SciPy library. Remaining Fortran to C translations have been completed---an experimental Fortran-free build option is now available to developers for testing purposes. Developer feedback is welcome on Fortran-free builds. scipy.signal.whittaker_henderson now provides access to Whittaker-Henderson smoothing of a discrete signal. A large number of 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. New features scipy.fft improvements SciPy's internal FFT backend has switched from pocketfft 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 improvements Users may now increase the QHull simplex assignment tolerance via the new simplex_tolerance argument to the _call__ methods of LinearNDInterpolator and CloughTocher2dInterpolator. This can help users avoid holes in certain interpolation problems. The FITPACK Fortran code has been ported to C. scipy.differentiate improvements scipy.differentiate.derivative now supports passing kwargs to the function whose derivative is desired. scipy.linalg improvements We now support three different build modes for BLAS and LAPACK: LP64-only, ILP64-only, and ILP64 for everyting except cython_blas/cython_lapack/ linalg.blas/linalg.lapack (support for Accelerate and MKL). Machinery is now provided for downstream cython_lapack users to gracefully handle LP64/ILP64 backend builds. Worked examples, including build system details, have been included in this release. An 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. Added ILP64 support to scipy.linalg.expm and scipy.linalg.sqrtm. The batching loops of 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. The performance of scipy.linalg.expm has been improved. The performance for 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 improvements The trust_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. The 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. Functions in scipy.optimize.elementwise now support passing kwargs to the callable function. scipy.signal improvements The new ~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 improvements In scipy.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. Added ILP64 BLAS/LAPACK support to SuperLU and PROPACK extensions. All sparse array/matrix formats now support matrix_transpose/.mT. Support for n-dimensional linear operators has been added to scipy.sparse.linalg.LinearOperator, and LinearOperator now has a new rdot method. scipy.sparse.linalg.minres now supports complex hermitian matrices. scipy.integrate improvements ILP64 support was added for ODEPACK scipy.integrate.tanhsinh and scipy.integrate.nsum now support passing kwargs to the function to be integrated. scipy.spatial improvements 3D area calculations are now faster in scipy.spatial.SphericalVoronoi. N-dimensional input is now supported for scipy.spatial.distance.minkowski, scipy.spatial.distance.euclidean, and scipy.spatial.distance.sqeuclidean. It is now possible to return sparse arrays rather than matrices from KDTree.sparse_distance_matrix. It is now possible to compose Rotation and RigidTransform directly, by automatically promoting Rotation when the two are composed via a multiplication operator. scipy.special improvements The accuracy of the following functions was improved: scipy.special.bdtrik, scipy.special.bdtrin, scipy.special.nbdtrik, scipy.special.nbdtrin. The numerical behavior for scipy.special.eval_jacobi has been improved for several parameter combinations. The Bessel functions scipy.special.j0 and scipy.special.y0 have improved accuracy for large arguments. scipy.stats improvements The accuracy of scipy.stats.pmean with tiny, nonzero p has been improved. The performance of scipy.stats.halfgennorm has been improved. zstatistic has been added to the result object of scipy.stats.mannwhitneyu. A large number of stats functions now support lazy arrays and JAX JIT (see Python Array API support section below). Support for the 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. The new function 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. Python Array API Standard Support Support has been added for CuPy delegation for: interpolate.PPoly, interpolate.BPoly, and interpolate.BSpline. CuPy support has been added for scipy.stats.rankdata. Array API support has been added for method and trim usage in scipy.stats.ttest_ind. Support for MArrays has been added to: 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. Array API support has been added to: 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. The torch support for scipy.signal.fftconvolve now correctly handles the float32 dtype. JAX JIT support has been added for: scipy.stats.binomtest (except for method='two-sided'), scipy.stats.mannwhitneyu (except for method='auto'), scipy.stats.lmoment, scipy.stats.m

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
9 June 2026