Skip to content

DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5. #8025

@mkcor

Description

@mkcor

Description:

The CI check "Test nightlies / wheels (push)" failed for commit ecfaf22 because "Setting the shape on a NumPy array has been deprecated in NumPy 2.5. As an alternative, you can create a new view using np.reshape (with copy=False if needed)."

See https://github.com/scikit-image/scikit-image/actions/runs/21073005850/job/60607456124, excerpt:

File "/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/skimage/morphology/grayreconstruct.py", line 216, in reconstruction
    rec_img.shape = np.array(seed.shape) + (np.array(footprint.shape) - 1)
    ^^^^^^^^^^^^^
DeprecationWarning: Setting the shape on a NumPy array has been deprecated in NumPy 2.5.
As an alternative, you can create a new view using np.reshape (with copy=False if needed).

The warning is treated as an error and it causes 5 failures in this check.

Way to reproduce:

No response

Version information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions