From ba552b9c698ff45e0901bee859bd1365c0012ccf Mon Sep 17 00:00:00 2001 From: Joris Vincent Date: Mon, 18 Dec 2023 13:29:44 +0100 Subject: [PATCH] fix(whites): enable specifying either 1, or multiple target indices Some configuration was causing errors --- stimupy/stimuli/whites.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stimupy/stimuli/whites.py b/stimupy/stimuli/whites.py index 4683ce9..c4cabff 100644 --- a/stimupy/stimuli/whites.py +++ b/stimupy/stimuli/whites.py @@ -118,6 +118,8 @@ def generalized( target_bar_mask = mask_targets( element_mask=stim["grating_mask"], target_indices=target_indices ) + if isinstance(target_indices, (int, float)): + target_indices = (target_indices,) stim["target_indices"] = target_indices # Mask rectangular regions