scipy/scipy: SciPy 1.17.0

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

Abstract

SciPy 1.17.0 Release Notes 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_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. In 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. Initial support for 64-bit integer (ILP64) BLAS and LAPACK libraries has been added, including for MKL and Apple Accelerate. Please report any issues with ILP64 you encounter. New features scipy.integrate improvements The integration routines dopri5, 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. The 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 improvements scipy.cluster.hierarchy.is_isomorphic has improved performance and array API support. scipy.interpolate improvements A new bc_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". A new 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. Performance of "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. Numerical stability of 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. The AAA, *Interpolator, *Poly, and *Spline classes now support subscription, making them generic types, for compatibility with scipy-stubs. scipy.linalg improvements scipy.linalg.inv routine has been improved: it now attempts to detect the structure of its argument and selects an appropriate low-level matrix inversion routine. A new 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); 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 of scipy.linalg.inv for details; the routine emits a LinAlgWarning if it detects an ill-conditioned input; performance for batched inputs has been improved. 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 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. The BroydenFirst, *Jacobian, and Bounds classes now support subscription, making them generic types, for compatibility with scipy-stubs. scipy.signal improvements scipy.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. The ShortTimeFFT and LinearTimeInvariant classes now support subscription, making them generic types, for compatibility with scipy-stubs. scipy.sparse improvements coo_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. Additional sparse construction functions include expand_dims, swapaxes, permute_dims, and nD support for the kron function. 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_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. Added scipy.sparse.linalg.funm_multiply_krylov, a restarted Krylov method for evaluating y = f(tA) b. In sparse.linalg, the LinearOperator, LaplacianNd, and SuperLU classes now support subscription, making them generic types, for compatibility with scipy-stubs. In sparse.linalg the eigs and eigsh functions now accept a new rng parameter. scipy.spatial improvements The 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: A shape property. A 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). An 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 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, stdtr and stdtrit. The incomplete beta functions betainc, betaincc, betaincinv and

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
10 January 2026