Skip to content

test_convolve_kernels.py fails with deprecation warning about Conversion of an array with ndim > 0 to a scalar is deprecated #14674

Closed

Description

@pllim

Started seeing this today. cc @keflavich

_ ERROR collecting astropy/convolution/tests/test_convolve_kernels.py _
astropy/convolution/tests/test_convolve_kernels.py:28: in <module>
    Gaussian2DKernel(
astropy/convolution/kernels.py:179: in __init__
    super().__init__(**kwargs)
astropy/convolution/core.py:315: in __init__
    array = discretize_model(self._model, x_range, y_range, **kwargs)
astropy/convolution/utils.py:162: in discretize_model
    if not float(np.diff(x_range)).is_integer():
E   DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated,
and will error in future. Ensure you extract a single element from your array
before performing this operation. (Deprecated NumPy 1.25.)

Update: Turns out this also affects 50+ other tests but not sure why I only saw convolution in that log. Caused by numpy/numpy#10615

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions