Skip to content

Commit 280472f

Browse files
committed
move "reset" earlier
1 parent d8749ff commit 280472f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

reproject/mosaicking/coadd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,12 @@ def reproject_and_coadd(
355355
return_footprint=False,
356356
**kwargs,
357357
)
358+
reset = np.isnan(array) | np.isnan(weights)
359+
else:
360+
reset = np.isnan(array)
358361

359362
# For the purposes of mosaicking, we mask out NaN values from the array
360363
# and set the footprint to 0 at these locations.
361-
reset = np.isnan(array) | np.isnan(weights)
362364
array[reset] = 0.0
363365
footprint[reset] = 0.0
364366

0 commit comments

Comments
 (0)