Skip to content

Commit

Permalink
only output warning for shape change, if it actually happened
Browse files Browse the repository at this point in the history
  • Loading branch information
LynnSchmittwilken committed Oct 1, 2022
1 parent 1909708 commit 60e51d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stimuli/illusions/whites.py
Expand Up @@ -110,8 +110,8 @@ def white_generalized(
img[y_start:y_end, x_start:x_end] = vtarget
mask[y_start:y_end, x_start:x_end] = i + 1

if period != "ignore":
new_shape = (img.shape[0]/ppd, img.shape[1]/ppd)
new_shape = (img.shape[0]/ppd, img.shape[1]/ppd)
if period != "ignore" and shape != new_shape:
print("Warning: White shape changed from %s to %s" % (shape, new_shape))

return {"img": img, "mask": mask}
Expand Down

0 comments on commit 60e51d9

Please sign in to comment.