fix MapDataset plot_residuals
fix MapDataset plot_residuals
@@ -558,6 +558,7 @@ class MapDataset(Dataset):
counts_spatial, npred_spatial, method
)
+ if self.mask_safe is not None:
mask = self.mask_safe.reduce_over_axes(func=np.logical_or)
spatial_residuals.data[~mask.data] = np.nan
