Skip to content

Commit

Permalink
Test existence of badpix using is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Mar 11, 2024
1 parent 8c49aef commit c222904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion galsim/hsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def _checkWeightAndBadpix(image, weight=None, badpix=None):
if np.any(weight.array < 0):
raise GalSimValueError("Weight image cannot contain negative values.", weight)

if badpix and badpix.bounds != image.bounds:
if badpix is not None and badpix.bounds != image.bounds:
raise GalSimIncompatibleValuesError(
"Badpix image does not have the same bounds as the input Image.",
badpix=badpix, image=image)
Expand Down

0 comments on commit c222904

Please sign in to comment.