Skip to content

Commit

Permalink
Fix contiguous memory error.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrawls committed Dec 24, 2024
1 parent 1a23822 commit 209be87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/lsst/ip/diffim/subtractImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,10 @@ def _checkMask(mask, sources, excludeMaskPlanes, checkAdjacent=True):
xv = (np.rint(sources.getX() - mask.getX0())).astype(int)
yv = (np.rint(sources.getY() - mask.getY0())).astype(int)

# The source catalog may not be contiguous.
if not sources.isContiguous():
sources = sources.copy(deep=True)

flags = np.ones(len(sources), dtype=bool)
if checkAdjacent:
pixRange = (0, -1, 1)
Expand Down

0 comments on commit 209be87

Please sign in to comment.