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

BUG: fix compatibility with numpy 2.0.0 (copy semantics) #824

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ccdproc/tests/test_ccdproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
except ImportError:
HAS_BLOCK_X_FUNCS = False

_NUMPY_COPY_IF_NEEDED = False if np.__version__.startswith("1.") else None

# Test creating deviation
# Success expected if u_image * u_gain = u_readnoise
Expand Down Expand Up @@ -977,7 +978,7 @@ def test_wcs_project_onto_scale_wcs():

# Mask should be true for four pixels (all nearest neighbors)
# of the single pixel we masked initially.
new_center = np.array(new_ccd.wcs.wcs.crpix, dtype=int, copy=False)
new_center = np.array(new_ccd.wcs.wcs.crpix, dtype=int, copy=_NUMPY_COPY_IF_NEEDED)
assert np.all(new_ccd.mask[new_center[0]:new_center[0]+2,
new_center[1]:new_center[1]+2])

Expand Down