diff --git a/reproject/mosaicking/coadd.py b/reproject/mosaicking/coadd.py index 56ddb209b..faac463d3 100644 --- a/reproject/mosaicking/coadd.py +++ b/reproject/mosaicking/coadd.py @@ -358,7 +358,7 @@ def reproject_and_coadd( # For the purposes of mosaicking, we mask out NaN values from the array # and set the footprint to 0 at these locations. - reset = np.isnan(array) + reset = np.isnan(array) | np.isnan(weights) array[reset] = 0.0 footprint[reset] = 0.0