Skip to content

Commit c222904

Browse files
committed
Test existence of badpix using is not None
1 parent 8c49aef commit c222904

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

galsim/hsm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def _checkWeightAndBadpix(image, weight=None, badpix=None):
504504
if np.any(weight.array < 0):
505505
raise GalSimValueError("Weight image cannot contain negative values.", weight)
506506

507-
if badpix and badpix.bounds != image.bounds:
507+
if badpix is not None and badpix.bounds != image.bounds:
508508
raise GalSimIncompatibleValuesError(
509509
"Badpix image does not have the same bounds as the input Image.",
510510
badpix=badpix, image=image)

0 commit comments

Comments
 (0)