Skip to content

Commit 0ee0429

Browse files
committed
Define selection before checking it
1 parent eb78c69 commit 0ee0429

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

pisa/core/pipeline.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -638,14 +638,13 @@ def check_VarBinning(self, output_binning=None):
638638
assert s.apply_mode == 'events'
639639

640640
# now check if VarBinning selection is exclusive (only necessary if list)
641+
if output_binning == None:
642+
selections = self.output_binning.selections
643+
nselections = self.output_binning.nselections
644+
else:
645+
selections = output_binning.selections
646+
nselections = output_binning.nselections
641647
if isinstance(selections, list):
642-
if output_binning == None:
643-
selections = self.output_binning.selections
644-
nselections = self.output_binning.nselections
645-
else:
646-
selections = output_binning.selections
647-
nselections = output_binning.nselections
648-
649648
for c in self.data:
650649
keep = np.zeros(c.size)
651650
for i in range(nselections):

0 commit comments

Comments
 (0)