File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,9 @@ def interval_counts(
447
447
elif interval .type == IntervalType .NOT_APPLICABLE :
448
448
not_applicable_count += 1
449
449
# we require at least one positive interval to be present in any case (hence the max(1, ...))
450
- effective_count_min = max (1 , self .expr .count_min - not_applicable_count ) # type: ignore[attr-defined]
450
+ effective_count_min = min (
451
+ self .expr .count_min , max (1 , len (intervals ) - not_applicable_count ) # type: ignore[attr-defined]
452
+ )
451
453
if positive_count >= effective_count_min :
452
454
effective_type = IntervalType .POSITIVE
453
455
else :
Original file line number Diff line number Diff line change @@ -1011,6 +1011,14 @@ class LeftDependentToggle(BinaryNonCommutativeOperator):
1011
1011
"""
1012
1012
A LeftDependentToggle object represents a logical AND operation if the left operand is positive,
1013
1013
otherwise it returns NOT_APPLICABLE.
1014
+
1015
+ | left | right | Result |
1016
+ |----------|----------|----------|
1017
+ | NEGATIVE | * | NOT_APPLICABLE |
1018
+ | NO_DATA | * | NOT_APPLICABLE |
1019
+ | POSITIVE | POSITIVE | POSITIVE |
1020
+ | POSITIVE | NEGATIVE | NEGATIVE |
1021
+ | POSITIVE | NO_DATA | NO_DATA |
1014
1022
"""
1015
1023
1016
1024
@@ -1019,7 +1027,6 @@ class ConditionalFilter(BinaryNonCommutativeOperator):
1019
1027
A ConditionalFilter object returns the right operand if the left operand is POSITIVE,
1020
1028
and NEGATIVE otherwise
1021
1029
1022
-
1023
1030
A conditional filter returns `right` iff `left` is POSITIVE, otherwise NEGATIVE.
1024
1031
1025
1032
| left | right | Result |
You can’t perform that action at this time.
0 commit comments