Skip to content

Commit 9ced51d

Browse files
committed
readability in pipeline
1 parent 975b45b commit 9ced51d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sigpro/pipeline.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ def __init__(self, primitives, primitive_combinations, features_as_strings=False
364364

365365
primitives_dict[primitive.get_tag()] = primitive
366366

367-
length = max([len(combination) for combination in primitive_combinations] + [0])
367+
if not primitive_combinations: # check if list is empty
368+
raise ValueError('At least one non-empty output feature must be specified')
369+
370+
length = max(len(combination) for combination in primitive_combinations)
368371
if length == 0:
369372
raise ValueError('At least one non-empty output feature must be specified')
370373

0 commit comments

Comments
 (0)