Update dependency scipy to v1.16.2 #73
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.7.2->==1.16.2Release Notes
scipy/scipy (scipy)
v1.16.2: SciPy 1.16.2Compare Source
SciPy 1.16.2 Release Notes
SciPy
1.16.2is a bug-fix release with no new featurescompared to
1.16.1. This is the first stable release ofSciPy to provide Windows on ARM wheels on PyPI.
Authors
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.txtfile.v1.16.1: SciPy 1.16.1Compare Source
SciPy 1.16.1 Release Notes
SciPy
1.16.1is a bug-fix release that adds support for Python3.14.0rc1,including PyPI wheels.
Authors
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.txtfile.v1.16.0: SciPy 1.16.0Compare Source
SciPy 1.16.0 Release Notes
SciPy
1.16.0is the culmination of 6 months of hard work. It containsmany 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 -Wdand check forDeprecationWarnings).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.13and NumPy1.25.2or greater.Highlights of this release
new support in
scipy.signal, and additional support inscipy.statsandscipy.special. Improved support for JAX and Dask backends has been added,with notable support in
scipy.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 bugsin the old Fortran 77 implementation with a better performance on average.
scipy.sparse.coo_arraynow supports n-D arrays with reshaping, arithmetic andreduction operations like sum/mean/min/max. No n-D indexing or
scipy.sparse.random_arraysupport yet.scipy.linalgnamespace that accept arrayarguments now support N-dimensional arrays to be processed as a batch.
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.scipy.spatial.transform.RigidTransform, provides functionalityto convert between different representations of rigid transforms in 3-D
space.
scipy.ndimage.vectorized_filterfor generic filters thattake advantage of a vectorized Python callable was added.
New features
scipy.ioimprovementsscipy.io.savematnow provides informative warnings for invalid field names.scipy.io.mmreadnow provides a clearer error message when provided witha source file path that does not exist.
scipy.io.wavfile.readcan now read non-seekable files.scipy.integrateimprovementsscipy.integrate.tanhsinhwas improved.scipy.interpolateimprovementsscipy.interpolate.make_smoothing_spline.scipy.linalgimprovementsscipy.linalgnamespace that accept arrayarguments now support N-dimensional arrays to be processed as a batch.
See
linalg_batchfor details.scipy.linalg.sqrtmis rewritten in C and its performance is improved. Italso 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
dispand the optional output argumenterrestaredeprecated and will be removed four versions later. Similarly, after
changing the underlying algorithm to recursion, the
blocksizekeywordargument has no effect and will be removed two versions later.
?stevd,?langb,?sytri,?hetriand?gbconwere added toscipy.linalg.lapack.scipy.linalg.eigh_tridiagonalwas improved.scipy.linalg.solvecan now estimate the reciprocal condition number andthe matrix norm calculation is more efficient.
scipy.ndimageimprovementsscipy.ndimage.vectorized_filterfor generic filters thattake advantage of a vectorized Python callable was added.
scipy.ndimage.rotatehas improved performance, especially on ARM platforms.scipy.optimizeimprovementsPRIMApackage.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
rhobegandtolrespectively. A largerrhobegcan help the algorithm take bigger steps initially, while asmaller
tolcan help it continue and find a better solution.For more information, see the PRIMA documentation.
scipy.optimize.minimizemethods, and thescipy.optimize.least_squaresfunction, have been given aworkerskeyword. This allows parallelization of some calculations via a map-like
callable, such as
multiprocessing.Pool. These parallelizationopportunities typically occur during numerical differentiation. This can
greatly speed up minimization when the objective function is expensive to
calculate.
lmmethod ofscipy.optimize.least_squarescan now accept3-pointandcsfor thejackeyword.constraint multipliers are exposed to the user through the
multiplierkeyword of the returned
scipy.optimize.OptimizeResultobject.regression introduced in 1.15.x
scipy.optimize.rootnow warns for invalid inner parameters when using thenewton_krylovmethodmethod='L-BFGS-B'now hasa faster
hess_inv.todense()implementation. Time complexity has improvedfrom cubic to quadratic.
scipy.optimize.least_squareshas a newcallbackargument that is applicableto the
trfanddogboxmethods.callbackmay be used to trackoptimization results at each step or to provide custom conditions for
stopping.
scipy.signalimprovementsscipy.signal.firwin_2dfor the creation of a 2-D FIR Filterusing the 1-D window method was added.
scipy.signal.cspline1d_evalandscipy.signal.qspline1d_evalnow providean informative error on empty input rather than hitting the recursion limit.
scipy.signal.closest_STFT_dual_windowto calculate thescipy.signal.ShortTimeFFTdual window of a given window closest to adesired dual window.
scipy.signal.ShortTimeFFT.from_win_equals_dualtocreate a
scipy.signal.ShortTimeFFTinstance where the window and its dualare equal up to a scaling factor. It allows to create short-time Fourier
transforms which are unitary mappings.
scipy.signal.convolve2dwas improved.scipy.sparseimprovementsscipy.sparse.coo_arraynow supports n-D arrays using binary and reductionoperations.
matmul.
scipy.sparse.csgraph.dijkstrashortest_path is more efficient.scipy.sparse.csgraph.yenhas performance improvements.sparse.csgraphandsparse.linalgwasadded.
scipy.spatialimprovementsscipy.spatial.transform.RigidTransform, provides functionalityto 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.Rotationnow has an appropriate__repr__method,and improved performance for its
scipy.spatial.transform.Rotation.applymethod.
scipy.statsimprovementsscipy.stats.quantile, an array API compatible function forquantile estimation, was added.
scipy.stats.make_distributionwas extended to work with existing discretedistributions and to facilitate the creation of custom distributions in the
new random variable infrastructure.
scipy.stats.Binomial, was added.equal_varkeyword was added toscipy.stats.tukey_hsd(enables theGames-Howell test) and
scipy.stats.f_oneway(enables Welch ANOVA).scipy.stats.gennormwas improved.scipy.stats.modeimplementation was vectorized, for faster batchcalculation.
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.keepdimsandnan_policykeywords was added toscipy.stats.gstd.scipy.stats.special_ortho_groupandscipy.stats.pearsonrwas improved.
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=1andproviding PyTorch, JAX, CuPy or Dask arrays as array arguments.
Many functions in
scipy.stats,scipy.special,scipy.optimize, andscipy.constantsnow provide tables documenting compatible array and devicetypes 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.signalfunctionalityscipy.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.hierarchyfunctionsscipy.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.
Deprecated features
atolargument ofscipy.optimize.nnlsis deprecated and willbe removed in SciPy 1.18.0.
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 to
1.0. This condition will produce NaNs beginning in SciPy1.18.0.
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.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.
argument
xhas been removed fromscipy.stats.linregress. The datamust be specified separately as
xandy.scipy.stats.power_divergenceandscipy.stats.chisquare.(e.g.,
scipy.sparse.base,scipy.interpolate.dfitpack) were cleanedup. They were previously already emitting deprecation warnings.
Backwards incompatible changes
scipy.linalgfunctions for solving a linear system (e.g.scipy.linalg.solve) documented that the RHS argument must be either 1-D or2-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.bootstrapnow explicitly broadcasts elements ofdatato thesame shape (ignoring
axis) before performing the calculation.from scipy.signal import *,but may still be imported directly, as detailed at scipy/scipy-stubs#549.
Build and packaging related changes
10.13.
from 60 MB to 30 MB.
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.
after
sf_error_statewas removed fromscipy.special.-Duse-system-librarieshas been added. It allowsopting in to using system libraries instead of using vendored sources.
Currently
Boost.MathandQhullare supported as system builddependencies.
Other changes
scipy-stubs(v1.16.0.0) isavailable at https://github.com/scipy/scipy-stubs/releases/tag/v1.16.0.0
scipy._libonscipy.sparsewas removed,which reduces the import time of a number of other SciPy submodules.
issues in
scipy.specialwere fixed, andpytest-run-parallelis now usedin a CI job to guard against regressions.
spinas a developerCLI was added, including support for editable installs. The SciPy-specific
python dev.pyCLI will be removed in the next release cycle in favor ofspin.scipy.specialwas moved to the newheader-only
xsflibrary. That library wasincluded back in the SciPy source tree as a git submodule.
namedtuple-like bunch objects returned by some SciPy functionsnow have improved compatibility with the
polarslibrary.rvsmethod ofscipy.stats.wrapcauchyis now mapped tothe unit circle between 0 and
2 * pi.lmmethod ofscipy.optimize.least_squaresnow has a different behaviorfor the maximum number of function evaluations,
max_nfev. The default forthe
lmmethod is changed to100 * n, for both a callable and anumerically 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), becausethe method included evaluations used in the estimation. In addition, for the
lmmethod the number of function calls used in Jacobian approximationis no longer included in
OptimizeResult.nfev. This brings the behaviorof
lm,trf, anddogboxinto line.Authors
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.v1.15.3: SciPy 1.15.3Compare Source
SciPy 1.15.3 Release Notes
SciPy
1.15.3is a bug-fix release with no new featurescompared to
1.15.2.For the complete issue and PR lists see the raw release notes.
Authors
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.
v1.15.2: SciPy 1.15.2Compare Source
SciPy 1.15.2 Release Notes
SciPy
1.15.2is a bug-fix release with no new featurescompared to
1.15.1. Free-threaded Python3.13wheelsfor Linux ARM platform are available on PyPI starting with
this release.
Authors
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.
v1.15.1: SciPy 1.15.1Compare Source
SciPy 1.15.1 Release Notes
SciPy
1.15.1is a bug-fix release with no new featurescompared to
1.15.0. Importantly, an issue with theimport of
scipy.optimizebreaking other packageshas been fixed.
Authors
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.
v1.15.0: SciPy 1.15.0Compare Source
SciPy 1.15.0 Release Notes
SciPy
1.15.0is the culmination of6months of hard work. It containsmany 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 -Wdand check forDeprecationWarnings).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.13and NumPy1.23.5or greater.Highlights of this release
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. Bothsparse.linalgandsparse.csgraphwork 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,tensordotand others. More functionality is coming in futurereleases.
Preliminary support for free-threaded Python 3.13.
New probability distribution features in
scipy.statscan be used to improvethe 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.differentiateis a new top-level submodule for accurateestimation of derivatives of black box functions.
scipy.optimize.elementwisecontains new functions for root-finding andminimization of univariate functions.
scipy.integrateoffers new functionscubature,tanhsinh, andnsumfor multivariate integration, univariate integration, andunivariate series summation, respectively.
scipy.interpolate.AAAadds the AAA algorithm for barycentric rationalapproximation of real or complex functions.
scipy.specialadds new functions offering improved Legendre functionimplementations with a more consistent interface.
New features
scipy.differentiateintroductionThe new
scipy.differentiatesub-package contains functions for accurateestimation of derivatives of black box functions.
scipy.differentiate.derivativefor first-order derivatives ofscalar-in, scalar-out functions.
scipy.differentiate.jacobianfor first-order partial derivatives ofvector-in, vector-out functions.
scipy.differentiate.hessianfor second-order partial derivatives ofvector-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.integrateimprovementsscipy.integrate.cubaturefunction supports multidimensionalintegration, and has support for approximating integrals with
one or more sets of infinite limits.
scipy.integrate.tanhsinhis now exposed for public use, allowingevaluation of a convergent integral using tanh-sinh quadrature.
scipy.integrate.nsumevaluates finite and infinite series and theirlogarithms.
scipy.integrate.lebedev_rulecomputes abscissae and weights forintegration over the surface of a sphere.
QUADPACKFortran77 package has been ported to C.scipy.interpolateimprovementsscipy.interpolate.AAAadds the AAA algorithm for barycentric rationalapproximation of real or complex functions.
scipy.interpolate.FloaterHormannInterpolatoradds barycentric rationalinterpolation.
scipy.interpolate.make_splrepandscipy.interpolate.make_splprepimplement construction of smoothing splines.The algorithmic content is equivalent to FITPACK (
splrepandsplprepfunctions, and
*UnivariateSplineclasses) and the user API is consistentwith
make_interp_spline: these functions receive data arrays and returna
scipy.interpolate.BSplineinstance.scipy.interpolate.generate_knotsimplements theFITPACK strategy for selecting knots of a smoothing spline given the
smoothness parameter,
s. The function exposes the internal logic of knotselection that
splrepand*UnivariateSplinewas using.scipy.linalgimprovementsscipy.linalg.interpolativeFortran77 code has been ported to Cython.scipy.linalg.solvesupports several new values for theassume_aargument, enabling faster computation for diagonal, tri-diagonal, banded, and
triangular matrices. Also, when
assume_ais left unspecified, thefunction now automatically detects and exploits diagonal, tri-diagonal,
and triangular structures.
scipy.linalgmatrix creation functions (scipy.linalg.circulant,scipy.linalg.companion,scipy.linalg.convolution_matrix,scipy.linalg.fiedler,scipy.linalg.fiedler_companion, andscipy.linalg.leslie) now support batchmatrix creation.
scipy.linalg.funmis faster.scipy.linalg.orthogonal_procrustesnow supports complex input.scipy.linalg.lapack:?lantr,?sytrs,?hetrs,?trcon,and
?gtcon.scipy.linalg.expmwas rewritten in C.scipy.linalg.null_spacenow accepts the new argumentsoverwrite_a,check_finite, andlapack_driver.id_distFortran code was rewritten in Cython.scipy.ndimageimprovementsaxesargumentthat 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_magnitudeandgeneric_filter.axesargument that specifies which axes of the input filtering is to be performed
on.
scipy.ndimage.rank_filtertime complexity has improved fromntolog(n).scipy.optimizeimprovements1.4.0to1.8.0,bringing accuracy and performance improvements to solvers.
MINPACKFortran77 package has been ported to C.L-BFGS-BFortran77 package has been ported to C.scipy.optimize.elementwisenamespace includes functionsbracket_root,find_root,bracket_minimum, andfind_minimumfor 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_scalarandscipy.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_evolutionnow supports more general use ofworkers, such as passing a map-like callable.scipy.optimize.nnlswas rewritten in Cython.HessianUpdateStrategynow supports__matmul__.scipy.signalimprovementssignal.chirp().scipy.signal.lombscarglehas two new arguments,weightsandfloating_mean, enabling sample weighting and removal of an unknowny-offset independently for each frequency. Additionally, the
normalizeargument includes a new option to return the complex representation of the
amplitude and phase.
scipy.signal.envelopefor computation of the envelope of areal or complex valued signal.
scipy.sparseimprovementsmoving from sparse.matrix to sparse.array in your code/library.
arrays are now fully functional for 1-D and 2D.
for basic arithmetic.
sparse.linalg.is_sptriangularandsparse.linalg.spbandwidthmimic the existing dense toolslinalg.is_triangularandlinalg.bandwidth.sparse.linalgandsparse.csgraphnow work with sparse arrays. Becareful that your index arrays are 32-bit. We are working on 64bit support.
ARPACKlibrary has been upgraded to version3.9.1.axisargument forcount_nonzero.incompatible data types, such as
float16.min,max,argmin, andargmaxnow support computationover nonzero elements only via the new
explicitargument.get_index_dtypeandsafely_cast_index_arraysareavailable to facilitate index array casting in
sparse.scipy.spatialimprovementsRotation.concatenatenow accepts a bareRotationobject, and willreturn a copy of it.
scipy.specialimprovementsNew 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}nowoffer an extension to the complex domain by passing the kwarg
extend='complex'. This is opt-in because it changes the values fornegative inputs (which by default return 0), as well as for some integers
(in the case of
factorial2andfactorialk; for more details,check the respective docstrings).
scipy.special.zetanow defines the Riemann zeta function on the complexplane.
scipy.special.softpluscomputes the softplus functionThe spherical Bessel functions (
scipy.special.spherical_jn,scipy.special.spherical_yn,scipy.special.spherical_in, andscipy.special.spherical_kn) now support negative arguments with real dtype.scipy.special.logsumexpnow preserves precision when one element of thesum has magnitude much bigger than the rest.
The accuracy of several functions has been improved:
scipy.special.ncfdtr,scipy.special.nctdtr, andscipy.special.gdtribhave been improved throughout the domain.scipy.special.hyperuis improved for the case ofb=1, smallx,and small
a.scipy.special.logitis improved near the argumentp=0.5.scipy.special.rel_entris improved whenx/yoverflows, underflows,or is close to
1.scipy.special.ndtris now more efficient forsqrt(2)/2 < |x| < 1.scipy.statsimprovementsA 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_infrastructurefor a tutorial.scipy.stats.make_distributionto treat an existing continuousdistribution (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.Normalandscipy.stats.Uniformare pre-defined classesto represent the normal and uniform distributions, respectively.
Their interfaces may be faster and more convenient than those produced by
make_distribution.scipy.stats.Mixturecan be used to represent mixture distributions.Instances of
scipy.stats.Normal,scipy.stats.Uniform, and the classesreturned by
scipy.stats.make_distributionare supported by several newmathematical transformations.
scipy.stats.truncatefor truncation of the support.scipy.stats.order_statisticfor the order statistics of a given numberof IID random variables.
scipy.stats.abs,scipy.stats.exp, andscipy.stats.log. For example,scipy.stats.abs(Normal())is distributed according to the folded normaland
scipy.stats.exp(Normal())is lognormally distributed.The new
scipy.stats.lmomentcalculates sample l-moments and l-momentratios. Notably, these sample estimators are unbiased.
scipy.stats.chatterjeexicomputes the Xi correlation coefficient, whichcan detect nonlinear dependence. The function also performs a hypothesis
test of independence between samples.
scipy.stats.wilcoxonhas improved method resolution logic for the defaultmethod='auto'. Other values ofmethodprovided by the user are nowrespected in all cases, and the method argument
approxhas beenrenamed to
asymptoticfor consistency with similar functions. (Use ofapproxis still allowed for backward compatibility.)There are several new probability distributions:
scipy.stats.dpareto_lognormrepresents the double Pareto lognormaldistribution.
scipy.stats.landaurepresents the Landau distribution.scipy.stats.normal_inverse_gammarepresents the normal-inverse-gammadistribution.
scipy.stats.poisson_binomrepresents the Poisson binomial distribution.Batch calculation with
scipy.stats.alexandergovernandscipy.stats.combine_pvaluesis faster.scipy.stats.chisquareadded an argumentsum_check. By default, thefunction raises an error when the sum of expected and obseved frequencies
are not equal; setting
sum_check=Falsedisables this check tofacilitate hypothesis tests other than Pearson's chi-squared test.
The accuracy of several distribution methods has been improved, including:
scipy.stats.nctmethodpdfscipy.stats.crystalballmethodsfscipy.stats.geommethodrvsscipy.stats.cauchymethodslogpdf,pdf,ppfandisflogcdfand/orlogsfmethods of distributions that do notoverride 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, andscipy.stats.t.scipy.stats.qmc.PoissonDisknow accepts lower and upper boundsparameters
l_boundsandu_bounds.scipy.stats.fisher_exactnow supports two-dimensional tables with shapesother than
(2, 2).Preliminary Support for Free-Threaded CPython 3.13
SciPy
1.15has preliminary support for the free-threaded build of CPython3.13.This allows SciPy functionality to execute in parallel with Pythonthreads
(see the
threadingstdlib module). This support was enabled by fixing asignificant 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.3is required at runtime. Note that building for afree-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_safetyfor 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.13build.Many threading bugs can also occur in code that releases the GIL; disabling
the GIL only makes it easier to hit threading bugs.
Array API Standard Support
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=1andproviding PyTorch, JAX, ndonnx, or CuPy arrays as array arguments. Features
with support added for SciPy
1.15.0include:scipy.differentiate(new sub-package)scipy.optimize.elementwise(new namespace)scipy.optimize.rosen,scipy.optimize.rosen_der, andscipy.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, andscipy.special.betainccscipy.stats.boxcox_llfscipy.stats.differential_entropyscipy.stats.zmap,scipy.stats.zscore, andscipy.stats.gzscorescipy.stats.tmean,scipy.stats.tvar,scipy.stats.tstd,scipy.stats.tsem,scipy.stats.tmin, andscipy.stats.tmaxscipy.stats.gmean,scipy.stats.hmeanandscipy.stats.pmeanscipy.stats.combine_pvaluesscipy.stats.ttest_ind,scipy.stats.ttest_relscipy.stats.directional_statsscipy.ndimagefunctions will now delegate tocupyx.scipy.ndimage,and for other backends will transit via NumPy arrays on the host.
Deprecated features and future changes
scipy.linalg.interpolative.randandscipy.linalg.interpolative.seedhave been deprecated and will be removedin SciPy
1.17.0.scipy.spatial.distance.cosineandscipy.spatial.distance.correlationhave been deprecated and will raisean error in SciPy
1.17.0.scipy.spatial.distance.kulczynski1andscipy.spatial.distance.sokalmichenerwere deprecated and will be removedin SciPy
1.17.0.scipy.stats.find_repeatsis deprecated and will beremoved in SciPy
1.17.0. Please usenumpy.unique/numpy.unique_countsinstead.scipy.linalg.kronis deprecated in favour ofnumpy.kron.scipy.signalconvolution/correlation functions (
scipy.signal.correlate,scipy.signal.convolveandscipy.signal.choose_conv_method) andfiltering functions (
scipy.signal.lfilter,scipy.signal.sosfilt) hasbeen deprecated and will be removed in SciPy
1.17.0.scipy.stats.linregresshas deprecated one-argument use; the twovariables must be specified as separate arguments.
scipy.stats.trapzis deprecated in favor ofscipy.stats.trapezoid.scipy.special.lpnis deprecated in favor ofscipy.special.legendre_p_all.scipy.special.lpmnandscipy.special.clpmnare deprecated in favor ofscipy.special.assoc_legendre_p_all.scipy.special.sph_harmhas been deprecated in favor ofscipy.special.sph_harm_y.randcarrays passed toscipy.linalg.toeplitz,scipy.linalg.matmul_toeplitz, orscipy.linalg.solve_toeplitzwill betreated as batches of 1-D coefficients beginning in SciPy
1.17.0.random_stateandpermutationsarguments ofscipy.stats.ttest_indare deprecated. Usemethodto perform apermutation test, instead.
Expired Deprecations
scipy.signalhave been removed. This includesdaub,qmf,cascade,morlet,morlet2,ricker,and
cwt. Users should usepywaveletsinstead.scipy.signal.cmplx_sorthas been removed.scipy.integrate.quadratureandscipy.integrate.romberghave beenremoved in favour of
scipy.integrate.quad.scipy.stats.rvs_ratio_uniformshas been removed in favor ofscipy.stats.sampling.RatioUniforms.scipy.special.factorialnow raises an error for non-integer scalars whenexact=True.scipy.integrate.cumulative_trapezoidnow raises an error for values ofinitialother than0andNone.scipy.interpolate.Akima1DInterpolatorand
scipy.interpolate.PchipInterpolatorspecial.btdtrandspecial.btdtrihave been removed.exact=kwarg inspecial.factorialkhas changedfrom
TruetoFalse.scipy.miscsubmodule have been removed.Backwards incompatible changes
interpolate.BSpline.integrateoutput 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
extrapolateargument.scipy.stats.wilcoxonnow respects themethodargument provided by theuser. Previously, even if
method='exact'was specified, the functionwould resort to
method='approx'in some cases.scipy.integrate.AccuracyWarninghas been removed as the functions thewarning was emitted from (
scipy.integrate.quadratureandscipy.integrate.romberg) have been removed.Other changes
A separate accompanying type stubs package,
scipy-stubs, will be madeavailable with the
1.15.0release. Installation instructions areavailable.
scipy.stats.bootstrapnow emits aFutureWarningif the shapes of theinput arrays do not agree. Broadcast the arrays to the same batch shape
(i.e. for all dimensions except those specified by the
axisargument)to avoid the warning. Broadcasting will be performed automatically in the
future.
SciPy endorsed SPEC-7,
which proposes a
rngargument to control pseudorandom number generation(PRNG) in a standard way, replacing legacy arguments like
seedandrandom_sate. In many cases, use ofrngwill change the behavior ofthe function unless the argument is already an instance of
numpy.random.Generator.Effective in SciPy
1.15.0:rngargument 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, allscipy.stats.qmcclasses that consume random numbers, andscipy.stats.sobol_indices.rngargument will follow the SPEC 7standard behavior: the argument will be normalized with
np.random.default_rngbefore being used.will remain unchanged (for now).
It is planned that in
1.17.0the legacy argument will start emittingwarnings, and that in
1.19.0the default behavior will change.In all cases, users can avoid future disruption by proactively passing
an instance of
np.random.Generatorby keywordrng. For details,see SPEC-7.
The SciPy build no longer adds
-std=legacyfor 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.sosfreqzhas been renamed toscipy.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.13thave beenmade in:
scipy.special,scipy.spatial,scipy.sparse,scipy.interpolate.Authors (commits)
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.
v1.14.1: SciPy 1.14.1Compare Source
SciPy 1.14.1 Release Notes
SciPy
1.14.1adds support for Python3.13, including binarywheels on PyPI. Apart from that, it is a bug-fix release with
no new features compared to
1.14.0.Authors
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.
v1.14.0: SciPy 1.14.0Compare Source
SciPy 1.14.0 Release Notes
SciPy
1.14.0is the culmination of 3 months of hard work. It containsmany 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 -Wdand check forDeprecationWarnings).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 NumPy1.23.5or greater.For running on PyPy, PyPy3
6.0+is required.Highlights of this release
has wheels built against Accelerate for macOS >=14 resulting in significant
performance improvements for many linear algebra operations.
cobyqa, has been added toscipy.optimize.minimize- thisis 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_triangularis now more than an order ofmagnitude faster in many cases.
New features
scipy.fftimprovementsscipy.fft.prev_fast_len, has been added. This functionfinds 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.ioimprovementswavfilenow supports reading and writing ofwavfiles in the RF64format, allowing files greater than 4 GB in size to be handled.
scipy.constantsimprovementsscipy.interpolateimprovementsscipy.interpolate.Akima1DInterpolatornow supports extrapolation via theextrapolateargument.scipy.optimizeimprovementsscipy.optimize.HessianUpdateStrategynow also accepts square arrays forinit_scale.cobyqa, has been added toscipy.optimize.minimize- thisis 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.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.