Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pllim opened this issue Apr 21, 2023 · 0 comments · Fixed by #14671

Comments

@pllim
Copy link
Member

pllim commented Apr 21, 2023

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant