Skip to content

chore(deps): update python packages#294

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/python-packages
Open

chore(deps): update python packages#294
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/python-packages

Conversation

@renovate

@renovate renovate Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Update Change
certifi/python-certifi minor 2026.05.202026.06.17
kjd/idna minor v3.17v3.18
matplotlib/matplotlib minor v3.10.9v3.11.0
numpy/numpy minor v2.4.6v2.6.0.dev0
pandas-dev/pandas minor v3.0.3v3.1.0.dev0
scipy/scipy minor v1.17.1v1.18.0

Release Notes

certifi/python-certifi (certifi/python-certifi)

v2026.06.17

Compare Source

kjd/idna (kjd/idna)

v3.18

Compare Source

matplotlib/matplotlib (matplotlib/matplotlib)

v3.11.0: REL: v3.11.0

Compare 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.0rc2

Compare 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.0rc1

Compare 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.dev0

Compare 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

  • Distutils has been removed,
  • Many expired deprecations, see below,
  • Many new deprecations, see below,
  • Many static typing improvements.
  • Improved support for free threading,
  • Support for descending sorts,

See New Features below for other additions.

Deprecations

  • numpy.char.chararray is deprecated. Use an ndarray with a string or bytes dtype instead.

    (gh-30605)

  • numpy.take now correctly checks if the result can be cast to the provided
    out=out under the same-kind rule. A DeprecationWarning is given now
    when this check fails. Previously, take incorrectly checked if out
    could be cast to the result (the wrong direction). This deprecation also
    affects compress and possibly other functions. (Future versions of NumPy
    may tighten the casting check further.)

    (gh-30615)

  • The numpy.char.[as]array functions are deprecated. Use an
    numpy.[as]array with 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 shape 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 new view via np.reshape or
    np.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 possible
    with the private method np.ndarray._set_shape.

    (gh-29536)

  • Using the generic unit in numpy.timedelta64 is deprecated since this
    can 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, operations
    that implicitly rely on the generic unit are also deprecated. For
    example:

    arr = np.array([1, 2, 3], dtype="m8[s]")
    

1 is implicitly converted to generic timedelta64

  arr + 1

(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.fix is deprecated, use numpy.trunc instead. It is faster and
    follows the Array API standard. Both functions provide identical
    functionality: rounding array elements towards zero.

    (gh-30644)

  • numpy.ma.round_ is deprecated. numpy.ma.round can be used as a
    replacement.

    (gh-30738)

  • numpy.typename is deprecated because the names returned by it were
    outdated and inconsistent. numpy.dtype.name can be used as a
    replacement.

    (gh-30774)

  • Inputs other than integers are deprecated for numpy.triu_indices and
    numpy.tril_indices. Non-integer values for the M, k and N
    parameters of numpy.tri are deprecated. Non-integer values for the k
    parameter of both numpy.tril_indices_from and numpy.triu_indices_from
    are deprecated.

    (gh-30869)

  • Deprecations in custom dtype property and __array_finalize__.

    Previously arr.view(dtype=new_dtype) called arr.dtype = new_dtype
    also for subclasses, i.e., the attribute setting. That path is now
    deprecated and refined, meaning that even subclasses that do not see this
    DeprecationWarning may wish to update their code.

    A subclass that does any dtype specific logic (i.e. verifying the dtype
    in __array_finalize__ or has a dtype property) should now:

    • Set _set_dtype = None in which case arr.view(dtype=new_dtype)
      will call __array_finalize__ with the new dtype, ensuring that
      any validation __array_finalize__ will run is done.
    • Or, for a quick fix, define _set_dtype as a function (calling
      ndarray._set_dtype() to avoid DeprecationWarnings.
      (Future versions might migrate towards the _set_dtype = None path.)

    Ideally, follow NumPy's deprecation to prevent dtype mutation by users.
    The use of ndarray._set_dtype() may be necessary for some subclass
    finalization patterns, but should otherwise be avoided.

    (gh-31293)

Expired deprecations

  • numpy.distutils has been removed

    (gh-30340)

  • Passing None as dtype to np.finfo will now raise a TypeError
    (deprecated since 1.25)

    (gh-30460)

  • numpy.cross no longer supports 2-dimensional vectors.
    (Deprecated since 2.0)

    (gh-30461)

  • numpy._core.numerictypes.maximum_sctype has been removed.
    (deprecated since 2.0)

    (gh-30462)

  • numpy.row_stack has been removed in favor of numpy.vstack.
    (deprecated since 2.0)

    (gh-30463)

  • get_array_wrap has been removed.
    (deprecated since 2.0)

    (gh-30463)

  • recfromtxt and recfromcsv have been removed from numpy.lib._npyio
    in favor of numpy.genfromtxt.
    (deprecated since 2.0)

    (gh-30467)

  • The numpy.chararray re-export of numpy.char.chararray has been removed.
    (deprecated since 2.0)

    (gh-30604)

  • bincount now raises a TypeError for non-integer inputs.
    (deprecated since 2.1)

    (gh-30610)

  • The numpy.lib.math alias for the standard library math module has
    been 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 of
    ufunc.__doc__ = newdoc.
    (deprecated since 2.2)

    (gh-30614)

Compatibility notes

linalg.eig and linalg.eigvals now always return complex arrays

Previously, 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:

w = eigvals(a)
if np.any(w.imag == 0):  # this is what NumPy used to do
    w = w.real

If your matrix is symmetrix/hermitian, use eigh and eigvalsh instead of
eig and eigvals. These are guaranteed to return real values. A common
case 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.0
or 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:

Error compiling Cython file:
------------------------------------------------------------
...

versions.


#

See init.cython-30.pxd for the real Cython header


#

DEF err = int('Build aborted: the NumPy Cython headers require Cython 3.0.0 or newer.')
  ------------------------------------------------------------

  /path/to/site-packages/numpy/__init__.pxd:11:13: Error in compile-time expression:
  ValueError: invalid literal for int() with base 10: 
  'Build aborted: the NumPy Cython headers require Cython 3.0.0 or newer.'

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.where no longer truncates Python integers

Previously, if the x or y argument of numpy.where was a Python
integer that was out of range of the output type, it would be silently
truncated. Now, an OverflowError will 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_RawMalloc and PyMem_RawFree as the default memory
allocator, instead of system's malloc and free directly.

(gh-30846)

from_dlpack raises BufferError instead of RuntimeError

np.from_dlpack now raises BufferError instead of RuntimeError when
the 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 BufferError for data that cannot be
imported.

(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.binomial have been
corrected:

  • The third and fourth error terms were added rather than subtracted. This sign
    error was inherited from section 5.3 of the original 1988 paper by
    Kachitvichyanukul & Schmeiser, which incorrectly adds all four terms.
  • The leading coefficient had a digit-swap typo (13680 instead of
    13860) that was introduced in the initial implementation.

As a result, Generator.binomial and Generator.multinomial, which uses
binomial internally, may now return different samples for the same seed.

The legacy numpy.random.RandomState.binomial and
numpy.random.RandomState.multinomial are not affected: they preserve the
original (incorrect) behavior, so existing streams remain reproducible.

(gh-31238)

datetime64/timedelta64 arithmetic raises on overflow

Addition, subtraction, and integer multiplication of datetime64 and
timedelta64 values now raise OverflowError when the result would
overflow int64 or land on the NaT sentinel value. Previously these
operations silently wrapped, often producing a value that was indistinguishable
from NaT. This matches the overflow checking already performed by
unit-conversion casts.

(gh-31378)

C API changes

  • It is now possible to register "real" and "imag" ArrayMethods via
    PyUFunc_AddLoopsFromSpecs. These will be used for imag and real
    and should normally set *view_offset in their resolve_descriptors
    function to allow the array attributes to return views.

    (gh-30984)

  • New PyDataType_TYPE, PyDataType_KIND, PyDataType_BYTEORDER and
    PyDataType_TYPEOBJ accessor macros to the C API. Together with the other
    accessor macros added for the NumPy 2.0 transition, these allow accessing the
    fields of PyArray_Descr structs 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_DescrFromScalar now returns the full dtype descriptor for scalars
    of user-defined parametric data types, including any dtype parameters.
    Parameters were previously silently discarded, which could cause incorrect
    results in operations like astype on scalar objects. Internally, the
    function now delegates to discover_descr_from_pyobject, which handles
    parametric 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 to
    be 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-build feature.

Definitions for both default and AddressSanitizer-instrumented
(asan) builds are available in the source code under the
pixi-packages/ directory.

linux-64 and osx-arm64 platforms are supported.

(gh-30381)

numpy.ndarray now supports structural pattern matching

numpy.ndarray and its subclasses now have the Py_TPFLAGS_SEQUENCE flag
set, enabling structural pattern matching (PEP 634) with match/case
statements. 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, and lagvalnd have been added to evaluate polynomials
in arbitrary dimensions, analogous to the existing 2D and 3D evaluators.

(gh-30857)

New "descending" keyword argument for numpy.sort and numpy.argsort

Users can now pass the descending=True keyword argument to numpy.sort
and numpy.argsort to sort and argsort arrays in descending order. NaN
values, 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, and generic. Note that SIMD optimizations for sorting
are currently not available for descending sorts, so performance may be slower.

(gh-31345)

Improvements

For f2py, the behaviour of intent(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 equivalent
type to that used in the fortran routine, i.e., dtype.kind is the same. For
instance, a routine expecting double would be able to receive float, but would
raise on integer input.

(gh-29929)

f2py modules now show allocatable arrays in dir()

Allocatable module variables wrapped by f2py now appear in dir()
output, matching their accessibility by name.

(gh-30965)

Performance improvements and changes

Improved performance of numpy.searchsorted

The C++ binary search implementation used by numpy.searchsorted now has a
much 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:

  • Lock-free dispatch table: The ufuncs dispatch table is now implemented as
    a lock-free concurrent hash map, allowing multiple threads to call ufuncs
    without contention.
  • Immortal shared objects: Certain shared objects, such as global memory
    handlers, have been made immortal. This effectively reduces reference
    counting contention across threads.
  • Optimized memory allocation: NumPy now utilizes PyMem_RawMalloc and
    PyMem_RawFree for memory allocation. On Python 3.15 and newer, this
    leverages mimalloc and significantly reduces memory allocation overhead
    in multi-threaded workloads.

(gh-30846)

Faster reductions on small/medium contiguous arrays

numpy.sum, numpy.prod, numpy.any, numpy.all, and other
reductions 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 small
arrays; numpy.any / numpy.all on contiguous boolean arrays can see
speedup up to 1.9x.

(gh-31274)

Typing improvements and changes

numpy.linalg typing improvements and preliminary shape-typing support

Input and output dtypes for numpy.linalg functions 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.matmul now depends on the shape-type of its inputs, or fall
back 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.ma typing annotations

The numpy.ma module is now fully covered by typing annotations. This
includes 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 a
1-d float64 array, and np.sum(x, keepdims=True) has the same number of
dimensions as x.

This covers numpy.linalg functions, array creation functions (like
asarray, 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 including
nonzero, transpose, diagonal, atleast_{1,2,3}d, clip,
round, inner, bincount, and fft.fftfreq. Several of these also
gained 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.fft typing improvements and preliminary shape-typing support

The numpy.fft functions now support non-float64/complex128 dtypes
and gain preliminary shape-typing support. For example, the return type of
numpy.fft.fft now depends on the shape-type of its inputs, falling back to
the backward-compatible return type when the shape-types are unknown at
type-checking time.

(gh-31226)

Changes

Structured array copies now use memcpy for contiguous dtypes

Copying structured arrays with identical dtypes now uses memcpy instead of
field-by-field transfer when the dtype has a contiguous layout (no gaps between
fields). A new NPY_NOT_TRIVIALLY_COPYABLE dtype flag is set on structured
dtypes that have gaps in their memory layout, such as those created with
explicit offsets or via multi-field indexing. Only these dtypes continue to
use 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 the
memcpy, whereas previously they were left untouched. Code that relies on
padding bytes being preserved during structured array copies may be affected.

(gh-29270)

numpy.ctypeslib.as_ctypes now does not support scalar types

The function numpy.ctypeslib.as_ctypes has been updated to only accept
numpy.ndarray. Passing a scalar type (e.g., numpy.int32(5)) will now
raise a TypeError. This change was made to avoid the issue
gh-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 to numpy.ctypeslib.as_ctypes.

(gh-30538)

__array_interface__ changes on scalars

Scalars now export the __array_interface__ directly rather than including
an array copy as a __ref entry. This means that scalars are now exported as
read-only while they previously exported as writeable. The path via __ref
was undocumented and not consistently used even within NumPy itself.

(gh-30538)

meshgrid now always returns a tuple

np.meshgrid previously used to return a list when sparse was true and
copy was false. Now, it always returns a tuple regardless of the
arguments.

(gh-30707)

numpy.triu_indices now accepts unsigned integers

numpy.triu_indices previously used to error in some cases when unsigned integers
were given as arguments. Now, it accepts them in all cases.

(gh-30869)

object dtype in .real and .imag and related functions

The array attributes .real and .imag now behave differently for object
arrays and return getattr(element, "real", element) or getattr(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 uses arr.imag.

Previously, .imag always returned 0 while .real returned the
original 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_RawMalloc

NumPy's internal memory allocations now use PyMem_RawMalloc instead of
malloc and can be tracked by tracemalloc.

(gh-31503)

v2.5.0.dev0

Compare Source

pandas-dev/pandas (pandas-dev/pandas)

v3.1.0.dev0

Compare Source

scipy/scipy (scipy/scipy)

v1.18.0: SciPy 1.18.0

Compare Source

SciPy 1.18.0 Release Notes

SciPy 1.18.0 is the culmination of 6 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.18.x branch, and on adding new features on the main branch.

This release requires Python 3.12-3.14 and NumPy 2.0.0 or greater.

Highlights of this release

  • SciPy now supports three different build modes for BLAS and LAPACK
    LP64/ILP64 support, and machinery is provided for downstream cython_lapack
    consumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
    has been substantially improved across the SciPy library.
  • Remaining Fortran to C translations have been completed---an experimental
    Fortran-free build option is now available to developers for testing
    purposes. Developer feedback is welcome on Fortran-free builds.
  • scipy.signal.whittaker_henderson now provides access to Whittaker-Henderson
    smoothing of a discrete signal.
  • A large number of scipy.stats functions now support lazy arrays and JAX
    JIT. Array API support has been improved substantially in SciPy, with at least
    21 functions gaining new support in this release. 16 scipy.stats functions
    have also gained support for MArray input.

New features

scipy.fft improvements

  • SciPy's internal FFT backend has switched from pocketfft to its
    successor package ducc0.fft, which features several incremental
    improvements. The most significant of those from SciPy's perspective is
    probably that storage requirements for internally cached plans have been
    significantly reduced for most long 1D transforms. Plans that require more
    storage than 1MB will no longer be cached; this mainly affects huge 1D
    transforms of prime and near-prime sizes.

scipy.interpolate improvements

  • Users may now increase the QHull simplex assignment tolerance via the new
    simplex_tolerance argument to the _call__ methods of
    LinearNDInterpolator and CloughTocher2dInterpolator. This can
    help users avoid holes in certain interpolation problems.
  • The FITPACK Fortran code has been ported to C.

scipy.differentiate improvements

  • scipy.differentiate.derivative now supports passing kwargs to the
    function whose derivative is desired.

scipy.linalg improvements

  • We now support three different build modes for BLAS and LAPACK: LP64-only,
    ILP64-only, and ILP64 for everyting except cython_blas/cython_lapack/
    linalg.blas/linalg.lapack (support for Accelerate and MKL).
  • Machinery is now provided for downstream cython_lapack users to gracefully
    handle LP64/ILP64 backend builds. Worked examples, including build system
    details, have been included in this release.
  • An overwrite_b keyword argument was added to eigvals, for consistency
    with other similar linalg functions.
  • linalg.cholesky now leverages symmetry properties for performance
    improvements, especially for real matrices. The batching loop of cholesky
    has now also been moved to a C implementation.
  • scipy.linalg.lu and scipy.linalg.det have been rewritten in C++ with
    batching support in the compiled code.
  • Added ILP64 support to scipy.linalg.expm and scipy.linalg.sqrtm.
  • The batching loops of scipy.linalg.qr, scipy.linalg.eig,
    scipy.linalg.lstsq, and scipy.linalg.svd have been moved to C,
    providing a substantial speedup for batched input.
  • The performance of scipy.linalg.expm has been improved.
  • The performance for scipy.linalg.solve has improved for batched inputs.
  • scipy.linalg.bandwidth now supports batching for greater than or equal to
    2 dimensional input.

scipy.optimize improvements

  • The trust_constr method for minimize was adjusted so that if the x
    array would result in infeasible constraints, and those constraints were
    marked as keep_feasible, then the objective function is not called with
    that x array.
  • The COBYQA method for minimize now supports being called
    concurrently by multiple threads. Previously, multiple threads calling this
    function would only run one at a time.
  • scipy.optimize.nnls, and minimize methods SLSQP and L-BFGS-B
    now have support for ILP64 LAPACK, when available.
  • Functions in scipy.optimize.elementwise now support passing kwargs
    to the callable function.

scipy.signal improvements

  • The new ~scipy.signal.whittaker_henderson implements Whittaker-Henderson smoothing
    of a discrete signal. It offers different penalties to control the smoothness as well
    as automatic selection of the penalty strength via optimization of the restricted
    maximum likelihood (REML) criterion.
    It is a valuable alternative for the Savitzky-Golay filter
    ~scipy.signal.savgol_filter.
    In econometrics, Whittaker-Henderson graduation of penalty order 2 is also known as
    Hodrick-Prescott filter.
  • lfilter_zi was refactored for improved numerical stability and
    efficiency. It now raises a ValueError if parameter a has leading
    zeros, i.e., a[0] == 0, since lfilter and filtfilt do not support
    that as well. Furthermore, a ValueError instead of a LinAlgError is
    raised if the filter is unstable due to having a pole at z = 1.

scipy.sparse improvements

  • In scipy.sparse.csgraph the computation of strongly connected components
    for directed graphs is now 2x faster with better cache locality, using
    algorithmic improvements described in the recent survey by Tarjan and Zwick.
  • Added ILP64 BLAS/LAPACK support to SuperLU and PROPACK extensions.
  • All sparse array/matrix formats now support matrix_transpose/.mT.
  • Support for n-dimensional linear operators has been added to
    scipy.sparse.linalg.LinearOperator, and LinearOperator now has
    a new rdot method.
  • scipy.sparse.linalg.minres now supports complex hermitian matrices.

scipy.integrate improvements

  • ILP64 support was added for ODEPACK
  • scipy.integrate.tanhsinh and scipy.integrate.nsum now support passing
    kwargs to the function to be integrated.

scipy.spatial improvements

  • 3D area calculations are now faster in scipy.spatial.SphericalVoronoi.
  • N-dimensional input is now supported for scipy.spatial.distance.minkowski,
    scipy.spatial.distance.euclidean, and scipy.spatial.distance.sqeuclidean.
  • It is now possible to return sparse arrays rather than matrices from
    KDTree.sparse_distance_matrix.
  • It is now possible to compose Rotation and RigidTransform directly,
    by automatically promoting Rotation when the two are composed via
    a multiplication operator.

scipy.special improvements

  • The accuracy of the following functions was improved: scipy.special.bdtrik,
    scipy.special.bdtrin, scipy.special.nbdtrik, scipy.special.nbdtrin.
  • The numerical behavior for scipy.special.eval_jacobi has been improved
    for several parameter combinations.
  • The Bessel functions scipy.special.j0 and scipy.special.y0
    have improved accuracy for large arguments.

scipy.stats improvements

  • The accuracy of scipy.stats.pmean with tiny, nonzero p has been
    improved.
  • The performance of scipy.stats.halfgennorm has been improved.
  • zstatistic has been added to the result object of
    scipy.stats.mannwhitneyu.
  • A large number of stats functions now support lazy arrays and JAX
    JIT (see Python Array API support section below).
  • Support for the nan_policy keyword argument has been added to:
    scipy.stats.obrientransform, scipy.stats.boxcox,
    scipy.stats.boxcox_normmax, scipy.stats.yeojohnson,
    scipy.stats.yeojohnson_normmax, scipy.stats.sigmaclip, and
    scipy.stats.expectile.
  • scipy.stats.ContinuousDistribution.lmoment has been added for computing
    population L-moments.
  • The new function scipy.stats.estimated_cdf has been added. It reproduces
    much of the functionality of stats.mstats.plotting_positions,
    stats.percentileofscore, stats.ecdf.cdf, and stats.cumfreq, but
    is also vectorized.
  • scipy.stats.ansari accepts a new method argument.
  • scipy.stats.bws_test, scipy.stats.expectile, and
    scipy.stats.quantile_test now accept an axis argument.
  • scipy.stats.expectile and scipy.stats.quantile_test accept a new
    keepdims argument.
  • scipy.stats.binomtest now supports batching of k, n, and p.

Python Array API Standard Support

  • Support has been added for CuPy delegation for: interpolate.PPoly,
    interpolate.BPoly, and interpolate.BSpline.
  • CuPy support has been added for scipy.stats.rankdata.
  • Array API support has been added for method and trim usage
    in scipy.stats.ttest_ind.
  • Support for MArrays has been added to: scipy.stats.cramervonmises,
    scipy.stats.ks_1samp, scipy.stats.ks_2samp, scipy.stats.mode,
    scipy.stats.rankdata, scipy.stats.kruskal, scipy.stats.brunnermunzel,
    scipy.stats.spearmanrho, scipy.stats.friedmanchisquare,
    scipy.stats.cramervonmises_2samp, scipy.stats.mannwhitneyu,
    scipy.stats.wilcoxon, scipy.stats.fligner, scipy.stats.linregress,
    scipy.stats.alexandergovern, and scipy.stats.levene.
  • Array API support has been added to: scipy.stats.quantile_test,
    scipy.stats.kendalltau (via NumPy conversion), scipy.stats.kstest,
    scipy.sparse.linalg.LinearOperator, scipy.stats.cumfreq,
    scipy.stats.relfreq, scipy.stats.ks_2samp, scipy.stats.theilslopes,
    scipy.stats.siegelslopes, scipy.stats.obrientransform (including marray),
    scipy.stats.binomtest, scipy.integrate.fixed_quad, scipy.signal.square,
    scipy.stats.expectile, scipy.stats.shapiro, scipy.stats.pointbiserialr,
    scipy.stats.bws_test, scipy.stats.estimated_cdf (new function),
    scipy.stats.linregress, scipy.integrate.simpson, and
    scipy.signal.sawtooth.
  • The torch support for scipy.signal.fftconvolve now correctly
    handles the float32 dtype.
  • JAX JIT support has been added for: scipy.stats.binomtest
    (except for method='two-sided'), scipy.stats.mannwhitneyu
    (except for method='auto'), scipy.stats.lmoment, scipy.stats.moment,
    scipy.stats.ansari (related to new method argument),
    scipy.stats.yeojohnson_llf, scipy.stats.epps_singleton_2samp,
    scipy.stats.wilcoxon (except for method='exact' and method='auto'),
    scipy.stats.rankdata (via delegation), scipy.signal.oaconvolve,
    scipy.signal.hilbert, and scipy.signal.hilbert2.

Deprecated features and future changes

  • passing lwork parameter to scipy.linalg.qr has been deprecated. The
    functionality was rarely used; the function computes the optimal size of the
    work arrays automatically, therefore users should simply remove their uses
    of the lwork parameter.
  • The sparse construction functions kron, kronsum and block_diag
    choose return type sparray or spmatrix depending on the type of the
    sparse input arrays. When no inputs are sparse, the output is chosen to be
    spmatrix. That has been deprecated. The return type when no inputs are
    sparse will be changing to sparray. You can control the output type by
    ensuring that at least one input array is sparse. If any are sparray,
    the output will be sparray. If all sparse inputs are spmatrix,
    the output will be spmatrix.
  • A FutureWarning is now issued for calling {r}matvec on column vectors
    with LinearOperator. Identical behavior can be achieved (and extended to
    batch dimensions) via {r}matmat.
  • scipy.linalg functions are now stricter--using non-LAPACK dtypes is
    deprecated. 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_matrix have been deprecated in favor of
    other superior functions.
  • scipy.spatial.tsearch has been deprecated because it duplicates functionality
    more conveniently provided within the Delaunay class proper.
  • The following functions have been deprecated because they were deemed
    not practically useful: scipy.interpolate.pade, scipy.interpolate.lagrange,
    and scipy.interpolate.approximate_taylor_polynomial.
  • Setting spmatrix=True for the scipy.io readers mmio, FFM, hb,
    and matlab/_mio is now deprecated, including when set as the default
    value.
  • The unintentionally public scipy.cluster.vq.py_vq has been deprecated.

Backwards incompatible changes

  • The output of scipy.stats.rankdata is now always of a floating point
    dtype -- the result dtype of the input and a Python float.
  • The behavior of the residuals returned by scipy.linalg.lstsq has been
    changed. For lapack_driver == "gelsy" or the system being either
    underdetermined or square, empty residuals are still returned. For
    lapack_driver == "gesld"/"gelss" in combination with an overdetermined
    system 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.
  • The 2nd output object of scipy.stats.contingency.crosstab when kwarg
    sparse=True is now a sparse array holding the counts instead of a sparse
    matrix. 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: * means
    matmul and always-2D. For more info see migration_to_sparray.
  • scipy.stats.obrientransform now returns a tuple of arrays instead of
    a single ndarray.
  • scipy.stats.multinomial now returns NaNs when the category probability
    (p) rows/arrays do not sum to unity. This is an expiration of the deprecated
    behavior of adjusting the final element in the p array to compensate.
    Note that multinomial.rvs will now raise an error in such cases, since it
    has an integral return type.
  • The iprint and disp parameters of scipy.optimize.fmin_l_bfgs_b
    have been removed, following the expiry of their deprecation.
  • For scipy.linalg.{sqrtm, logm, signm}, disp (and sqrtm
    blocksize) parameters were removed (expired deprecations).
  • The deprecated atol argument of scipy.optimize.nnls has been
    removed.
  • For 2D input, the return type of scipy.linalg.bandwidth has changed from
    (int, int) to (np.int64, np.int64).
  • The second return type of scipy.linalg.cho_factor changed from bool
    to NDArray[np.bool].
  • The second return type of scipy.interpolate.splint changed from a 1D
    float64 array to None when full_output=True.
  • The types of the k and n attributes of the BinomTestResult
    object returned by scipy.stats.binomtest have changed from int to
    np.float64.

Other changes

  • The vendored Boost.Math was updated from 1.89.0 to 1.91.0.
  • SciPy now has a Pixi package definition, allowing developers to easily build
    SciPy from source inside Pixi workspaces.
  • Developers may be interested in the private build option _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.
  • The private scipy.interpolate._regrid function may be of experimental
    interest. 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

  • Name (commits)
  • h-vetinari (1)
  • Joseph Adams (1) +
  • Adrián Raso González (1) +
  • Virgile Andreani (1)
  • AshwathElang0 (1) +
  • Mart-Mihkel Aun (1) +
  • BarnikRB (2) +
  • Richie Bendall (1) +
  • J Berg (7) +
  • Florian Bourgey (50)
  • Jake Bowhay (99)
  • Jonathan Brodrick (1) +
  • Dietrich Brunn (36)
  • Evgeni Burovski (200)
  • Matthias Bussonnier (6)
  • CJ Carey (9)
  • Christine P. Chai (2)
  • Lucas Colley (90)
  • Dan (3) +
  • devdanzin (2) +
  • Martin Diehl (4)
  • Sam Dolat (2) +
  • dphipps-qnx (1) +
  • DWesl (2)
  • efrat99 (3) +
  • fbrandt (1) +
  • August Femtehjell (2) +
  • Matthew H Flamm (1)
  • Juan Flores (1) +
  • foreverallama (1) +
  • fumoboy007 (4) +
  • John Patrick Gallagher (1) +
  • Wei Bo Gao (1) +
  • Christoph Gohlke (1)
  • Nathan Goldbaum (20)
  • Ludmila Golomozin (11) +
  • Ralf Gommers (173)
  • Mathieu Guay-Paquet (1) +
  • Matt Haberland (147)
  • Joren Hammudoglu (30)
  • Jacob Hass (4)
  • Maya Horii (1) +
  • Guido Imperiale (1)
  • Jan Möseritz-Schmidt (2)
  • Leo Ji (4) +
  • JOD (2) +
  • Aditya Kamath (2) +
  • Mukunda Rao Katta (1) +
  • Robert Kern (1)
  • Ria Khatoniar (1) +
  • Matthias Koeppe (1)
  • krishneetRAJ (1) +
  • Iason Krommydas (1) +
  • Eric Larson (1)
  • Basil Liekens (31) +
  • lnzwz (2) +
  • Christian Lorentzen (15)
  • Alex Lubbock (1) +
  • Echedey Luis (2) +
  • Lunyxis (1) +
  • Zhang Maiyun (1) +
  • Diego Medina Medina (1) +
  • Elle Musoke (11) +
  • Andrew Nelson (103)
  • Nick ODell (29)
  • Dimitri Papadopoulos Orfanos (1)
  • partev (1)
  • Matti Picus (7)
  • Ilhan Polat (190)
  • Pradyot Ranjan (2) +
  • Adrian Raso (3)
  • Aditya Rawat (1) +
  • Tyler Reddy (99)
  • Martin Reinecke (1)
  • Lucas Roberts (6)
  • Pamphile Roy (1)
  • Daniel Schmitz (26)
  • Martin Schuck (4)
  • Dan Schult (47)
  • Scott Shambaugh (16)
  • Sabaa Siddique (1) +
  • Nicholas Smith (1) +
  • Johannes F. Sommerfeldt (1) +
  • SpookyYomo (2) +
  • Albert Steppi (80)
  • Charalampos Stratakis (16) +
  • Taylor (1) +
  • thecaptain789 (1) +
  • Adam Turner (1)
  • Jacob Vanderplas (1)
  • Christian Veenhuis (2)
  • Sebastiano Vigna (1)
  • Rivka Walles (14) +
  • Warren Weckesser (11)
  • Soeren Wolfers (1) +
  • wongaokay (1) +
  • Xuefeng Xu (1)
  • Aniket Singh Yadav (2) +
  • yaochengchen (2) +
  • Fadi Younes (2) +
  • Isaiah Zimmerman (1) +
  • Simon Zwieback (1) +
  • ਗਗਨਦੀਪ ਸਿੰਘ (Gagandeep Singh) (19)

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.0rc2

Compare Source

SciPy 1.18.0 Release Notes

note: SciPy 1.18.0 is not released yet!

SciPy 1.18.0 is the culmination of 6 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been a number of deprecations and API changes
in this release, which are documented below. All users are encouraged to
upgrade to this release, as there are a large number of bug-fixes and
optimizations. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.18.x branch, and on adding new features on the main branch.

This release requires Python 3.12-3.14 and NumPy 2.0.0 or greater.

Highlights of this release

  • SciPy now supports three different build modes for BLAS and LAPACK
    LP64/ILP64 support, and machinery is provided for downstream cython_lapack
    consumers to gracefully handle LP64/ILP64 backend builds. ILP64 support
    has been substantially improved across the SciPy library.
  • Remaining Fortran to C translations have been completed---an experimental
    Fortran-free build option is now available to developers for testing
    purposes. Developer feedback is welcome on Fortran-free builds.
  • scipy.signal.whittaker_henderson now provides access to Whittaker-Henderson
    smoothing of a discrete signal.
  • A large number of scipy.stats functions now support lazy arrays and JAX
    JIT. Array API support has been improved substantially in SciPy, with at least
    21 functions gaining new support in this release. 16 scipy.stats functions
    have also gained support for MArray input.

New features

scipy.fft improvements

  • SciPy's internal FFT backend has switched from pocketfft to its
    successor package ducc0.fft, which features several incremental
    improvements. The most significant of those from SciPy's perspective is
    probably that storage requirements for internally cached plans have been
    significantly reduced for most long 1D transforms. Plans that require more
    storage than 1MB will no longer be cached; this mainly affects huge 1D
    transforms of prime and near-prime sizes.

scipy.interpolate improvements

  • Users may now increase the QHull simplex assignment tolerance via the new
    simplex_tolerance argument to the _call__ methods of
    LinearNDInterpolator and CloughTocher2dInterpolator. This can
    help users avoid holes in certain interpolation problems.
  • The FITPACK Fortran code has been ported to C.

scipy.differentiate improvements

  • scipy.differentiate.derivative now supports passing kwargs to the
    function whose derivative is desired.

scipy.linalg improvements

  • We now support three different build modes for BLAS and LAPACK: LP64-only,
    ILP64-only, and ILP64 for everyting except cython_blas/cython_lapack/
    linalg.blas/linalg.lapack (support for Accelerate and MKL).
  • Machinery is now provided for downstream cython_lapack users to gracefully
    handle LP64/ILP64 backend builds. Worked examples, including build system
    details, have been included in this release.
  • An overwrite_b keyword argument was added to eigvals, for consistency
    with other similar linalg functions.
  • linalg.cholesky now leverages symmetry properties for performance
    improvements, especially for real matrices. The batching loop of cholesky
    has now also been moved to a C implementation.
  • scipy.linalg.lu and scipy.linalg.det have been rewritten in C++ with
    batching support in the compiled code.
  • Added ILP64 support to scipy.linalg.expm and scipy.linalg.sqrtm.
  • The batching loops of scipy.linalg.qr, scipy.linalg.eig,
    scipy.linalg.lstsq, and scipy.linalg.svd have been moved to C,
    providing a substantial speedup for batched input.
  • The performance of scipy.linalg.expm has been improved.
  • The performance for scipy.linalg.solve has improved for batched inputs.
  • scipy.linalg.bandwidth now supports batching for greater than or equal to
    2 dimensional input.

scipy.optimize improvements

  • The trust_constr method for minimize was adjusted so that if the x
    array would result in infeasible constraints, and those constraints were
    marked as keep_feasible, then the objective function is not called with
    that x array.
  • The COBYQA method for minimize now supports being called
    concurrently by multiple threads. Previously, multiple threads calling this
    function would only run one at a time.
  • scipy.optimize.nnls, and minimize methods SLSQP and L-BFGS-B
    now have support for ILP64 LAPACK, when available.
  • Functions in scipy.optimize.elementwise now support passing kwargs
    to the callable function.

scipy.signal improvements

  • The new ~scipy.signal.whittaker_henderson implements Whittaker-Henderson smoothing
    of a discrete signal. It offers different penalties to control the smoothness as well
    as automatic selection of the penalty strength via optimization of the restricted
    maximum likelihood (REML) criterion.
    It is a valuable alternative for the Savitzky-Golay filter
    ~scipy.signal.savgol_filter.
    In econometrics, Whittaker-Henderson graduation of penalty order 2 is also known as
    Hodrick-Prescott filter.
  • lfilter_zi was refactored for improved numerical stability and
    efficiency. It now raises a ValueError if parameter a has leading
    zeros, i.e., a[0] == 0, since lfilter and filtfilt do not support
    that as well. Furthermore, a ValueError instead of a LinAlgError is
    raised if the filter is unstable due to having a pole at z = 1.

scipy.sparse improvements

  • In scipy.sparse.csgraph the computation of strongly connected components
    for directed graphs is now 2x faster with better cache locality, using
    algorithmic improvements described in the recent survey by Tarjan and Zwick.
  • Added ILP64 BLAS/LAPACK support to SuperLU and PROPACK extensions.
  • All sparse array/matrix formats now support matrix_transpose/.mT.
  • Support for n-dimensional linear operators has been added to
    scipy.sparse.linalg.LinearOperator, and LinearOperator now has
    a new rdot method.
  • scipy.sparse.linalg.minres now supports complex hermitian

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "every weekend"
  • Automerge
    • At any time (no schedule defined)

🚦 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants