chore(deps): update python packages#294
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
2026.05.20→2026.06.17v3.17→v3.18v3.10.9→v3.11.0v2.4.6→v2.6.0.dev0v3.0.3→v3.1.0.dev0v1.17.1→v1.18.0Release Notes
certifi/python-certifi (certifi/python-certifi)
v2026.06.17Compare Source
kjd/idna (kjd/idna)
v3.18Compare Source
matplotlib/matplotlib (matplotlib/matplotlib)
v3.11.0: REL: v3.11.0Compare Source
The largest change within this release is a complete overhaul of text and font processing. Through the use of libraqm, HarfBuzz, SheenBidi, and an updated release of FreeType, all text should now support modern font features, enabling full internationalization in all languages. Not all features of these libraries are supported yet, but we expect this work to enable further improvements in an easier manner.
Outside of text handling, there are several improvements to 3D Axes, performance, new accessible colour sequences, flexible figure management, and more. See the release notes for more information.
v3.11.0rc2: REL: v3.11.0rc2Compare Source
This is the second release candidate for the meso release 3.11.0.
This release candidate fixes some problems with downstream packages, removes some missed deprecations, and corrects some additional minor bugs.
v3.11.0rc1: REL: v3.11.0rc1Compare Source
After an extended development stretch, we are pleased to announce the first release candidate of Matplotlib 3.11.0.
The largest change within this release is a complete overhaul of text and font processing. Through the use of libraqm, HarfBuzz, SheenBidi, and an updated release of FreeType, all text should now support modern font features, enabling full internationalization in all languages. Not all features of these libraries are supported yet, but we expect this work to enable further improvements in an easier manner. Due to the update to the font rendering stack, we cannot guarantee that text will be bit-for-bit perfect with previous releases, so if you are using Matplotlib for testing, it may be necessary to introduce/raise a tolerance within your tests.
Outside of text handling, there are several improvements to 3D Axes, performance, new accessible colour sequences, flexible figure management, and more. Final release notes are still being curated, but you may browse the list of new features, API changes, and all issues/pull requests on the milestone.
As a note for downstream packagers, the font libraries have only been tested against the versions bundled with the wheels. It may be possible to expand the range of requirements, or that a requirement is too broad. Please report any issues you have building against external dependencies.
numpy/numpy (numpy/numpy)
v2.6.0.dev0Compare Source
v2.5.0rc1: (June 2, 2026)Compare Source
NumPy 2.5.0 Release Notes
Numpy 2.5.0 is a transitional release. It drops support for Python 3.11,
marking the end of distutils, and expires a large number of deprecations made
in the 2.0.x release. It also improves free threading and brings sorting into
compliance with the array-api standard with the addition of descending sorts.
Python 3.15 will be supported when it is released.
This release supports Python versions 3.12-3.14.
Highlights
See New Features below for other additions.
Deprecations
numpy.char.chararrayis deprecated. Use anndarraywith a string or bytes dtype instead.(gh-30605)
numpy.takenow correctly checks if the result can be cast to the providedout=outunder the same-kind rule. ADeprecationWarningis given nowwhen this check fails. Previously,
takeincorrectly checked ifoutcould be cast to the result (the wrong direction). This deprecation also
affects
compressand possibly other functions. (Future versions of NumPymay tighten the casting check further.)
(gh-30615)
The
numpy.char.[as]arrayfunctions are deprecated. Use annumpy.[as]arraywith a string or bytes dtype instead.(gh-30802)
Setting the dtype attribute is deprecated because mutating an array is unsafe
if an array is shared, especially by multiple threads. As an alternative,
you can create a view with a new dtype via
array.view(dtype=new_dtype).(gh-29244)
Setting the
shapeattribute is deprecated because mutating an array isunsafe if an array is shared, especially by multiple threads. As an
alternative, you can create a new view via
np.reshapeornp.ndarray.reshape. For example:x = np.arange(15); x = np.reshape(x, (3, 5)).To ensure no copy is made from the data, one can use
np.reshape(..., copy=False).While setting the shape on an array is discouraged, for cases where it is
difficult to work around, e.g., in
__array_finalize__, it is possiblewith the private method
np.ndarray._set_shape.(gh-29536)
Using the
genericunit innumpy.timedelta64is deprecated since thiscan lead to unexpected behavior such as non-transitive comparison, see
gh-28287 for details. As
an alternative, specify an explicit unit such as
's'(seconds) or'D'(days) when constructing
numpy.timedelta64. Due to this change, operationsthat implicitly rely on the
genericunit are also deprecated. Forexample:
1is implicitly converted to generic timedelta64(gh-29619)
Resizing a Numpy array in place is deprecated since mutating an array is
unsafe if an array is shared, especially by multiple threads. As an
alternative, you can create a resized array via
np.resize.(gh-30181)
numpy.fixis deprecated, usenumpy.truncinstead. It is faster andfollows the Array API standard. Both functions provide identical
functionality: rounding array elements towards zero.
(gh-30644)
numpy.ma.round_is deprecated.numpy.ma.roundcan be used as areplacement.
(gh-30738)
numpy.typenameis deprecated because the names returned by it wereoutdated and inconsistent.
numpy.dtype.namecan be used as areplacement.
(gh-30774)
Inputs other than integers are deprecated for
numpy.triu_indicesandnumpy.tril_indices. Non-integer values for theM,kandNparameters of
numpy.triare deprecated. Non-integer values for thekparameter of both
numpy.tril_indices_fromandnumpy.triu_indices_fromare deprecated.
(gh-30869)
Deprecations in custom
dtypeproperty and__array_finalize__.Previously
arr.view(dtype=new_dtype)calledarr.dtype = new_dtypealso for subclasses, i.e., the attribute setting. That path is now
deprecated and refined, meaning that even subclasses that do not see this
DeprecationWarningmay wish to update their code.A subclass that does any
dtypespecific logic (i.e. verifying the dtypein
__array_finalize__or has adtypeproperty) should now:_set_dtype = Nonein which casearr.view(dtype=new_dtype)will call
__array_finalize__with the new dtype, ensuring thatany validation
__array_finalize__will run is done._set_dtypeas a function (callingndarray._set_dtype()to avoidDeprecationWarnings.(Future versions might migrate towards the
_set_dtype = Nonepath.)Ideally, follow NumPy's deprecation to prevent
dtypemutation by users.The use of
ndarray._set_dtype()may be necessary for some subclassfinalization patterns, but should otherwise be avoided.
(gh-31293)
Expired deprecations
numpy.distutilshas been removed(gh-30340)
Passing
Noneas dtype tonp.finfowill now raise aTypeError(deprecated since 1.25)
(gh-30460)
numpy.crossno longer supports 2-dimensional vectors.(Deprecated since 2.0)
(gh-30461)
numpy._core.numerictypes.maximum_sctypehas been removed.(deprecated since 2.0)
(gh-30462)
numpy.row_stackhas been removed in favor ofnumpy.vstack.(deprecated since 2.0)
(gh-30463)
get_array_wraphas been removed.(deprecated since 2.0)
(gh-30463)
recfromtxtandrecfromcsvhave been removed fromnumpy.lib._npyioin favor of
numpy.genfromtxt.(deprecated since 2.0)
(gh-30467)
The
numpy.chararrayre-export ofnumpy.char.chararrayhas been removed.(deprecated since 2.0)
(gh-30604)
bincountnow raises aTypeErrorfor non-integer inputs.(deprecated since 2.1)
(gh-30610)
The
numpy.lib.mathalias for the standard librarymathmodule hasbeen removed.
(deprecated since 1.25)
(gh-30612)
Data type alias
'a'was removed in favor of'S'.(deprecated since 2.0)
(gh-30613)
_add_newdoc_ufunc(ufunc, newdoc)has been removed in favor ofufunc.__doc__ = newdoc.(deprecated since 2.2)
(gh-30614)
Compatibility notes
linalg.eigandlinalg.eigvalsnow always return complex arraysPreviously, the return values depended on whether the eigenvalues happen to lie
on the real line (which, for a general, non-symmetric matrix, is not
guaranteed).
This change makes consistent what was a value-dependent result. To retain the
previous behavior, do:
If your matrix is symmetrix/hermitian, use
eighandeigvalshinstead ofeigandeigvals. These are guaranteed to return real values. A commoncase is covariance matrices, which are symmetric and positive definite by
construction.
(gh-30411)
MSVC support
NumPy now requires minimum MSVC 19.35 toolchain version on Windows platforms.
This corresponds to Visual Studio 2022 version 17.5 Preview 2 or newer.
(gh-30489)
Cython support
NumPy's Cython headers (accessed via
cimport numpy) now require Cython 3.0or newer to build. If you try to compile a project that depends on NumPy's
Cython headers using Cython 0.29 or older, you will see a message like this:
versions.
See init.cython-30.pxd for the real Cython header
Note that the invalid integer is not a bug in NumPy - we are intentionally
generating this error to avoid triggering a more obscure error later in the
build when an older Cython version tries to use a Cython feature that was not
available in the old Cython version.
(gh-30770)
numpy.whereno longer truncates Python integersPreviously, if the
xoryargument ofnumpy.wherewas a Pythoninteger that was out of range of the output type, it would be silently
truncated. Now, an
OverflowErrorwill be raised instead.This change also applies to the underlying C API function
PyArray_Where.(gh-30803)
Default memory allocator change
NumPy now uses
PyMem_RawMallocandPyMem_RawFreeas the default memoryallocator, instead of system's
mallocandfreedirectly.(gh-30846)
from_dlpackraisesBufferErrorinstead ofRuntimeErrornp.from_dlpacknow raisesBufferErrorinstead ofRuntimeErrorwhenthe incoming DLPack tensor has an unsupported device, dtype, or exceeds the
maximum number of dimensions. This aligns with the DLPack and Array API
specifications, which recommend
BufferErrorfor data that cannot beimported.
(gh-30937)
Corrections to the BTPE binomial sampler
Two independent errors in the Stirling series of the acceptance/rejection step
of the BTPE algorithm used by
numpy.random.Generator.binomialhave beencorrected:
error was inherited from section 5.3 of the original 1988 paper by
Kachitvichyanukul & Schmeiser, which incorrectly adds all four terms.
13680instead of13860) that was introduced in the initial implementation.As a result,
Generator.binomialandGenerator.multinomial, which usesbinomial internally, may now return different samples for the same seed.
The legacy
numpy.random.RandomState.binomialandnumpy.random.RandomState.multinomialare not affected: they preserve theoriginal (incorrect) behavior, so existing streams remain reproducible.
(gh-31238)
datetime64/timedelta64arithmetic raises on overflowAddition, subtraction, and integer multiplication of
datetime64andtimedelta64values now raiseOverflowErrorwhen the result wouldoverflow
int64or land on theNaTsentinel value. Previously theseoperations silently wrapped, often producing a value that was indistinguishable
from
NaT. This matches the overflow checking already performed byunit-conversion casts.
(gh-31378)
C API changes
It is now possible to register
"real"and"imag"ArrayMethods viaPyUFunc_AddLoopsFromSpecs. These will be used forimagandrealand should normally set
*view_offsetin theirresolve_descriptorsfunction to allow the array attributes to return views.
(gh-30984)
New
PyDataType_TYPE,PyDataType_KIND,PyDataType_BYTEORDERandPyDataType_TYPEOBJaccessor macros to the C API. Together with the otheraccessor macros added for the NumPy 2.0 transition, these allow accessing the
fields of
PyArray_Descrstructs without any direct field accesses.(gh-30994)
NumPy now supports the stable ABI for free-threaded Python as described in
803{.interpreted-text role="pep"}.(gh-31091)
PyArray_DescrFromScalarnow returns the full dtype descriptor for scalarsof user-defined parametric data types, including any dtype parameters.
Parameters were previously silently discarded, which could cause incorrect
results in operations like
astypeon scalar objects. Internally, thefunction now delegates to
discover_descr_from_pyobject, which handlesparametric dtypes correctly.
(gh-31067)
New Features
It is now possible to register user-dtypes for dlpack export and import
via
numpy.dtypes.register_dlpack_dtype. This functionality is meant tobe used with care by user-dtype authors.
(gh-31256)
Pixi package definitions
Pixi package definitions have been added for different kinds
of from-source builds of NumPy. These can be used in
downstream Pixi workspaces via the
pixi-buildfeature.Definitions for both
defaultand AddressSanitizer-instrumented(
asan) builds are available in the source code under thepixi-packages/directory.linux-64andosx-arm64platforms are supported.(gh-30381)
numpy.ndarraynow supports structural pattern matchingnumpy.ndarrayand its subclasses now have thePy_TPFLAGS_SEQUENCEflagset, enabling structural pattern matching (PEP 634) with
match/casestatements. This also enables Cython to optimize integer indexing operations.
See
`arrays.ndarray.pattern-matching{.interpreted-text role="ref"}` for details.(gh-30653)
Added N-D evaluation functions to the polynomial package
New functions
polyvalnd,chebvalnd,legvalnd,hermvalnd,hermevalnd, andlagvalndhave been added to evaluate polynomialsin arbitrary dimensions, analogous to the existing 2D and 3D evaluators.
(gh-30857)
New "descending" keyword argument for
numpy.sortandnumpy.argsortUsers can now pass the
descending=Truekeyword argument tonumpy.sortand
numpy.argsortto sort and argsort arrays in descending order. NaNvalues, if present, are sorted to the end of the array in both ascending and
descending sorts. This feature is available for all built-in dtypes except
void,object, andgeneric. Note that SIMD optimizations for sortingare currently not available for descending sorts, so performance may be slower.
(gh-31345)
Improvements
For
f2py, the behaviour ofintent(inplace)has improved. Previously,if an input array did not have the right dtype or order, the input array was
modified in-place, changing its dtype and replacing its data by a corrected
copy. Now, instead, the corrected copy is kept a separate array, which, after
being passed and presumably modified by the fortran routine, is copied back to
the input routine. The above means one no longer has the risk that
pre-existing views or slices of the input array start pointing to unallocated
memory (at the price of increased overhead for the write-back copy at the end
of the call).
A potential problem would be that one might get very different results if one,
e.g., previously passed in an integer array where a double array was expected:
the writeback to integer would likely give wrong results. To avoid such
situations,
intent(inplace)will now only allow arrays that have equivalenttype to that used in the fortran routine, i.e.,
dtype.kindis the same. Forinstance, a routine expecting double would be able to receive float, but would
raise on integer input.
(gh-29929)
f2pymodules now show allocatable arrays indir()Allocatable module variables wrapped by
f2pynow appear indir()output, matching their accessibility by name.
(gh-30965)
Performance improvements and changes
Improved performance of
numpy.searchsortedThe C++ binary search implementation used by
numpy.searchsortednow has amuch better performance when searching for multiple keys. The new
implementation batches binary search steps across all keys to leverage cache
locality and out-of-order execution. Benchmarks show the new implementation can
be up to 20 times faster for hundreds of thousands keys while single-key
performance remains comparable to previous versions.
(gh-30517)
Improved scaling of ufuncs on free-threading
NumPy's ufuncs now scale significantly better on free-threading builds
of CPython due to the following optimizations:
a lock-free concurrent hash map, allowing multiple threads to call ufuncs
without contention.
handlers, have been made immortal. This effectively reduces reference
counting contention across threads.
PyMem_RawMallocandPyMem_RawFreefor memory allocation. On Python 3.15 and newer, thisleverages
mimallocand significantly reduces memory allocation overheadin multi-threaded workloads.
(gh-30846)
Faster reductions on small/medium contiguous arrays
numpy.sum,numpy.prod,numpy.any,numpy.all, and otherreductions with an identity value now use a fast path when the input is a
contiguous, aligned, non-object array and the reduction covers all axes
(
axis=None) with no special arguments. Typical speedup is ~1.3x on smallarrays;
numpy.any/numpy.allon contiguous boolean arrays can seespeedup up to 1.9x.
(gh-31274)
Typing improvements and changes
numpy.linalgtyping improvements and preliminary shape-typing supportInput and output dtypes for
numpy.linalgfunctions are now more precise.Several of these functions also gain preliminary shape-typing support while
remaining backward compatible. For example, the return type of
numpy.linalg.matmulnow depends on the shape-type of its inputs, or fallback to the backward-compatible return type if the shape-types are unknown at
type-checking time. Because of limitations in Python's type system and current
type-checkers, shape-typing cannot cover every situation and is often only
implemented for the most common lower-rank cases.
(gh-30480)
numpy.matyping annotationsThe
numpy.mamodule is now fully covered by typing annotations. Thisincludes annotations for masked arrays, masks, and various functions and
methods. With this, NumPy has achieved 100% typing coverage across all its
submodules.
(gh-30566)
Shape-typing support for many functions and methods
Many functions and methods now have shape-aware return type annotations.
Type-checkers can now infer the number of dimensions of the returned array
through common operations. For example,
np.linspace(0, 1)is now typed as a1-d
float64array, andnp.sum(x, keepdims=True)has the same number ofdimensions as
x.This covers
numpy.linalgfunctions, array creation functions (likeasarray,from{buffer,string,file,iter,regex}), range functions(
linspace,logspace,geomspace), aggregation functions and methods(
sum,mean,std,var,min,max,all,any,etc.), sorting (
sort,argsort,argpartition), cumulative operations(
cumsum,cumprod, etc.), set operations (unique_values,intersect1d,union1d, etc.), and various other functions includingnonzero,transpose,diagonal,atleast_{1,2,3}d,clip,round,inner,bincount, andfft.fftfreq. Several of these alsogained more precise return dtype annotations as part of this work.
Shape-typing is still a work-in-progress, so coverage is not yet complete.
Because of limitations in Python's type system and current type-checkers,
shape-typing is often only implemented for the most common lower-rank cases.
(gh-31172)
numpy.ffttyping improvements and preliminary shape-typing supportThe
numpy.fftfunctions now support non-float64/complex128dtypesand gain preliminary shape-typing support. For example, the return type of
numpy.fft.fftnow depends on the shape-type of its inputs, falling back tothe backward-compatible return type when the shape-types are unknown at
type-checking time.
(gh-31226)
Changes
Structured array copies now use
memcpyfor contiguous dtypesCopying structured arrays with identical dtypes now uses
memcpyinstead offield-by-field transfer when the dtype has a contiguous layout (no gaps between
fields). A new
NPY_NOT_TRIVIALLY_COPYABLEdtype flag is set on structureddtypes that have gaps in their memory layout, such as those created with
explicit
offsetsor via multi-field indexing. Only these dtypes continue touse the slower field-by-field copy.
This means that padding bytes in contiguous structured dtypes (e.g. those
created without explicit
offsets) may now be copied as part of thememcpy, whereas previously they were left untouched. Code that relies onpadding bytes being preserved during structured array copies may be affected.
(gh-29270)
numpy.ctypeslib.as_ctypesnow does not support scalar typesThe function
numpy.ctypeslib.as_ctypeshas been updated to only acceptnumpy.ndarray. Passing a scalar type (e.g.,numpy.int32(5)) will nowraise a
TypeError. This change was made to avoid the issuegh-30354 and to enforce the
readonly nature of scalar types in NumPy. The previous behavior relied on
undocumented implicit temporary arrays and was not well-defined. Users who
need to convert scalar types to ctypes should first convert them to an array
(e.g.,
numpy.asarray) before passing them tonumpy.ctypeslib.as_ctypes.(gh-30538)
__array_interface__changes on scalarsScalars now export the
__array_interface__directly rather than includingan array copy as a
__refentry. This means that scalars are now exported asread-only while they previously exported as writeable. The path via
__refwas undocumented and not consistently used even within NumPy itself.
(gh-30538)
meshgridnow always returns a tuplenp.meshgridpreviously used to return a list whensparsewas true andcopywas false. Now, it always returns a tuple regardless of thearguments.
(gh-30707)
numpy.triu_indicesnow acceptsunsigned integersnumpy.triu_indicespreviously used to error in some cases whenunsigned integerswere given as arguments. Now, it accepts them in all cases.
(gh-30869)
objectdtype in.realand.imagand related functionsThe array attributes
.realand.imagnow behave differently for objectarrays and return
getattr(element, "real", element)orgetattr(element, "imag", 0)elementwise. Additionally, the return for both is now read-only to avoid possible
in-place changes having no effect.
This change also affects
np.isreal()which usesarr.imag.Previously,
.imagalways returned0while.realreturned theoriginal array unmodified. The new behavior now returnes the correct values
for complex Python objects but may also lead to surprises for example if
element.real()is a method and not a property.(gh-30984)
NumPy's internal memory allocations now use
PyMem_RawMallocNumPy's internal memory allocations now use
PyMem_RawMallocinstead ofmallocand can be tracked bytracemalloc.(gh-31503)
v2.5.0.dev0Compare Source
pandas-dev/pandas (pandas-dev/pandas)
v3.1.0.dev0Compare Source
scipy/scipy (scipy/scipy)
v1.18.0: SciPy 1.18.0Compare Source
SciPy 1.18.0 Release Notes
SciPy
1.18.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.18.x branch, and on adding new features on the main branch.
This release requires Python
3.12-3.14and NumPy2.0.0or greater.Highlights of this release
LP64/ILP64 support, and machinery is provided for downstream
cython_lapackconsumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
has been substantially improved across the SciPy library.
Fortran-free build option is now available to developers for testing
purposes. Developer feedback is welcome on Fortran-free builds.
scipy.signal.whittaker_hendersonnow provides access to Whittaker-Hendersonsmoothing of a discrete signal.
scipy.statsfunctions now support lazy arrays and JAXJIT. Array API support has been improved substantially in SciPy, with at least
21 functions gaining new support in this release. 16
scipy.statsfunctionshave also gained support for MArray input.
New features
scipy.fftimprovementspocketfftto itssuccessor package
ducc0.fft, which features several incrementalimprovements. 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.interpolateimprovementssimplex_toleranceargument to the_call__methods ofLinearNDInterpolatorandCloughTocher2dInterpolator. This canhelp users avoid holes in certain interpolation problems.
scipy.differentiateimprovementsscipy.differentiate.derivativenow supports passingkwargsto thefunction whose derivative is desired.
scipy.linalgimprovementsILP64-only, and ILP64 for everyting except
cython_blas/cython_lapack/linalg.blas/linalg.lapack(support for Accelerate and MKL).cython_lapackusers to gracefullyhandle LP64/ILP64 backend builds. Worked examples, including build system
details, have been included in this release.
overwrite_bkeyword argument was added toeigvals, for consistencywith other similar
linalgfunctions.linalg.choleskynow leverages symmetry properties for performanceimprovements, especially for real matrices. The batching loop of
choleskyhas now also been moved to a C implementation.
scipy.linalg.luandscipy.linalg.dethave been rewritten in C++ withbatching support in the compiled code.
scipy.linalg.expmandscipy.linalg.sqrtm.scipy.linalg.qr,scipy.linalg.eig,scipy.linalg.lstsq, andscipy.linalg.svdhave been moved to C,providing a substantial speedup for batched input.
scipy.linalg.expmhas been improved.scipy.linalg.solvehas improved for batched inputs.scipy.linalg.bandwidthnow supports batching for greater than or equal to2 dimensional input.
scipy.optimizeimprovementstrust_constrmethod forminimizewas adjusted so that if thexarray would result in infeasible constraints, and those constraints were
marked as
keep_feasible, then the objective function is not called withthat
xarray.COBYQAmethod forminimizenow supports being calledconcurrently by multiple threads. Previously, multiple threads calling this
function would only run one at a time.
scipy.optimize.nnls, andminimizemethodsSLSQPandL-BFGS-Bnow have support for ILP64 LAPACK, when available.
scipy.optimize.elementwisenow support passingkwargsto the callable function.
scipy.signalimprovements~scipy.signal.whittaker_hendersonimplements Whittaker-Henderson smoothingof 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_ziwas refactored for improved numerical stability andefficiency. It now raises a
ValueErrorif parameterahas leadingzeros, i.e.,
a[0] == 0, sincelfilterandfiltfiltdo not supportthat as well. Furthermore, a
ValueErrorinstead of aLinAlgErrorisraised if the filter is unstable due to having a pole at
z = 1.scipy.sparseimprovementsscipy.sparse.csgraphthe computation of strongly connected componentsfor directed graphs is now 2x faster with better cache locality, using
algorithmic improvements described in the recent survey by Tarjan and Zwick.
matrix_transpose/.mT.scipy.sparse.linalg.LinearOperator, andLinearOperatornow hasa new
rdotmethod.scipy.sparse.linalg.minresnow supports complex hermitian matrices.scipy.integrateimprovementsscipy.integrate.tanhsinhandscipy.integrate.nsumnow support passingkwargsto the function to be integrated.scipy.spatialimprovementsscipy.spatial.SphericalVoronoi.scipy.spatial.distance.minkowski,scipy.spatial.distance.euclidean, andscipy.spatial.distance.sqeuclidean.KDTree.sparse_distance_matrix.RotationandRigidTransformdirectly,by automatically promoting
Rotationwhen the two are composed viaa multiplication operator.
scipy.specialimprovementsscipy.special.bdtrik,scipy.special.bdtrin,scipy.special.nbdtrik,scipy.special.nbdtrin.scipy.special.eval_jacobihas been improvedfor several parameter combinations.
scipy.special.j0andscipy.special.y0have improved accuracy for large arguments.
scipy.statsimprovementsscipy.stats.pmeanwith tiny, nonzerophas beenimproved.
scipy.stats.halfgennormhas been improved.zstatistichas been added to the result object ofscipy.stats.mannwhitneyu.statsfunctions now support lazy arrays and JAXJIT (see Python Array API support section below).
nan_policykeyword 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, andscipy.stats.expectile.scipy.stats.ContinuousDistribution.lmomenthas been added for computingpopulation L-moments.
scipy.stats.estimated_cdfhas been added. It reproducesmuch of the functionality of
stats.mstats.plotting_positions,stats.percentileofscore,stats.ecdf.cdf, andstats.cumfreq, butis also vectorized.
scipy.stats.ansariaccepts a newmethodargument.scipy.stats.bws_test,scipy.stats.expectile, andscipy.stats.quantile_testnow accept anaxisargument.scipy.stats.expectileandscipy.stats.quantile_testaccept a newkeepdimsargument.scipy.stats.binomtestnow supports batching ofk,n, andp.Python Array API Standard Support
interpolate.PPoly,interpolate.BPoly, andinterpolate.BSpline.scipy.stats.rankdata.methodandtrimusagein
scipy.stats.ttest_ind.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, andscipy.stats.levene.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, andscipy.signal.sawtooth.torchsupport forscipy.signal.fftconvolvenow correctlyhandles the
float32dtype.scipy.stats.binomtest(except for
method='two-sided'),scipy.stats.mannwhitneyu(except for
method='auto'),scipy.stats.lmoment,scipy.stats.moment,scipy.stats.ansari(related to newmethodargument),scipy.stats.yeojohnson_llf,scipy.stats.epps_singleton_2samp,scipy.stats.wilcoxon(except formethod='exact'andmethod='auto'),scipy.stats.rankdata(via delegation),scipy.signal.oaconvolve,scipy.signal.hilbert, andscipy.signal.hilbert2.Deprecated features and future changes
lworkparameter toscipy.linalg.qrhas been deprecated. Thefunctionality was rarely used; the function computes the optimal size of the
work arrays automatically, therefore users should simply remove their uses
of the
lworkparameter.kron,kronsumandblock_diagchoose return type
sparrayorspmatrixdepending on the type of thesparse input arrays. When no inputs are sparse, the output is chosen to be
spmatrix. That has been deprecated. The return type when no inputs aresparse will be changing to
sparray. You can control the output type byensuring that at least one input array is sparse. If any are
sparray,the output will be
sparray. If all sparse inputs arespmatrix,the output will be
spmatrix.FutureWarningis now issued for calling{r}matvecon column vectorswith
LinearOperator. Identical behavior can be achieved (and extended tobatch dimensions) via
{r}matmat.scipy.linalgfunctions are now stricter--using non-LAPACK dtypes isdeprecated. When the deprecations expire, this will effectively limit the
dtypes allowed in linear algebra functions to: integers (upcast to float),
and single/double precision float/complex dtypes.
scipy.spatial.minkowsi_distance,scipy.spatial.minkowsi_distance_p,and
scipy.spatial.distance_matrixhave been deprecated in favor ofother superior functions.
scipy.spatial.tsearchhas been deprecated because it duplicates functionalitymore conveniently provided within the
Delaunayclass proper.not practically useful:
scipy.interpolate.pade,scipy.interpolate.lagrange,and
scipy.interpolate.approximate_taylor_polynomial.spmatrix=Truefor thescipy.ioreadersmmio,FFM,hb,and
matlab/_miois now deprecated, including when set as the defaultvalue.
scipy.cluster.vq.py_vqhas been deprecated.Backwards incompatible changes
scipy.stats.rankdatais now always of a floating pointdtype -- the result dtype of the input and a Python
float.residualsreturned byscipy.linalg.lstsqhas beenchanged. For
lapack_driver == "gelsy"or the system being eitherunderdetermined or square, empty residuals are still returned. For
lapack_driver == "gesld"/"gelss"in combination with an overdeterminedsystem a non-empty residual is always returned. However, in the case where a
slice is not full column rank, the corresponding residual is set to
NaN.scipy.stats.contingency.crosstabwhen kwargsparse=Trueis now a sparse array holding the counts instead of a sparsematrix. This allows it to be nD, so can accept more than 2 sequences as
inputs, but it is a different class. Most operations work the same for
sparse arrays and matrixes with notable differences for matrix:
*meansmatmul and always-2D. For more info see
migration_to_sparray.scipy.stats.obrientransformnow returns a tuple of arrays instead ofa single
ndarray.scipy.stats.multinomialnow returns NaNs when the category probability(
p) rows/arrays do not sum to unity. This is an expiration of the deprecatedbehavior of adjusting the final element in the
parray to compensate.Note that
multinomial.rvswill now raise an error in such cases, since ithas an integral return type.
iprintanddispparameters ofscipy.optimize.fmin_l_bfgs_bhave been removed, following the expiry of their deprecation.
scipy.linalg.{sqrtm, logm, signm},disp(andsqrtmblocksize) parameters were removed (expired deprecations).atolargument ofscipy.optimize.nnlshas beenremoved.
scipy.linalg.bandwidthhas changed from(int, int)to(np.int64, np.int64).scipy.linalg.cho_factorchanged fromboolto
NDArray[np.bool].scipy.interpolate.splintchanged from a 1Dfloat64array toNonewhenfull_output=True.kandnattributes of theBinomTestResultobject returned by
scipy.stats.binomtesthave changed frominttonp.float64.Other changes
Boost.Mathwas updated from1.89.0to1.91.0.SciPy from source inside Pixi workspaces.
_without-fortran,which allows building SciPy from source in the absence of a Fortran compiler.
This is an early prototype of the planned capability of a Fortran-free
SciPy.
scipy.interpolate._regridfunction may be of experimentalinterest. It provides an interface for 2-D smoothing B-spline fitting via
separable 1-D FITPACK kernels. It is under consideraton for public exposure
in some form in the future.
Authors
A total of 103 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.
Note that the source and binary assets associated with this release were published to PyPI using trusted publishing, and so the trusted assets and their hashes are made available more securely at https://pypi.org/project/scipy/1.18.0/ rather than providing them here in a less secure manner.
v1.18.0rc2: SciPy 1.18.0rc2Compare Source
SciPy 1.18.0 Release Notes
note: SciPy
1.18.0is not released yet!SciPy
1.18.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.18.x branch, and on adding new features on the main branch.
This release requires Python
3.12-3.14and NumPy2.0.0or greater.Highlights of this release
LP64/ILP64 support, and machinery is provided for downstream
cython_lapackconsumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
has been substantially improved across the SciPy library.
Fortran-free build option is now available to developers for testing
purposes. Developer feedback is welcome on Fortran-free builds.
scipy.signal.whittaker_hendersonnow provides access to Whittaker-Hendersonsmoothing of a discrete signal.
scipy.statsfunctions now support lazy arrays and JAXJIT. Array API support has been improved substantially in SciPy, with at least
21 functions gaining new support in this release. 16
scipy.statsfunctionshave also gained support for MArray input.
New features
scipy.fftimprovementspocketfftto itssuccessor package
ducc0.fft, which features several incrementalimprovements. 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.interpolateimprovementssimplex_toleranceargument to the_call__methods ofLinearNDInterpolatorandCloughTocher2dInterpolator. This canhelp users avoid holes in certain interpolation problems.
scipy.differentiateimprovementsscipy.differentiate.derivativenow supports passingkwargsto thefunction whose derivative is desired.
scipy.linalgimprovementsILP64-only, and ILP64 for everyting except
cython_blas/cython_lapack/linalg.blas/linalg.lapack(support for Accelerate and MKL).cython_lapackusers to gracefullyhandle LP64/ILP64 backend builds. Worked examples, including build system
details, have been included in this release.
overwrite_bkeyword argument was added toeigvals, for consistencywith other similar
linalgfunctions.linalg.choleskynow leverages symmetry properties for performanceimprovements, especially for real matrices. The batching loop of
choleskyhas now also been moved to a C implementation.
scipy.linalg.luandscipy.linalg.dethave been rewritten in C++ withbatching support in the compiled code.
scipy.linalg.expmandscipy.linalg.sqrtm.scipy.linalg.qr,scipy.linalg.eig,scipy.linalg.lstsq, andscipy.linalg.svdhave been moved to C,providing a substantial speedup for batched input.
scipy.linalg.expmhas been improved.scipy.linalg.solvehas improved for batched inputs.scipy.linalg.bandwidthnow supports batching for greater than or equal to2 dimensional input.
scipy.optimizeimprovementstrust_constrmethod forminimizewas adjusted so that if thexarray would result in infeasible constraints, and those constraints were
marked as
keep_feasible, then the objective function is not called withthat
xarray.COBYQAmethod forminimizenow supports being calledconcurrently by multiple threads. Previously, multiple threads calling this
function would only run one at a time.
scipy.optimize.nnls, andminimizemethodsSLSQPandL-BFGS-Bnow have support for ILP64 LAPACK, when available.
scipy.optimize.elementwisenow support passingkwargsto the callable function.
scipy.signalimprovements~scipy.signal.whittaker_hendersonimplements Whittaker-Henderson smoothingof 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_ziwas refactored for improved numerical stability andefficiency. It now raises a
ValueErrorif parameterahas leadingzeros, i.e.,
a[0] == 0, sincelfilterandfiltfiltdo not supportthat as well. Furthermore, a
ValueErrorinstead of aLinAlgErrorisraised if the filter is unstable due to having a pole at
z = 1.scipy.sparseimprovementsscipy.sparse.csgraphthe computation of strongly connected componentsfor directed graphs is now 2x faster with better cache locality, using
algorithmic improvements described in the recent survey by Tarjan and Zwick.
matrix_transpose/.mT.scipy.sparse.linalg.LinearOperator, andLinearOperatornow hasa new
rdotmethod.scipy.sparse.linalg.minresnow supports complex hermitianConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.