Skip to content

Commit 5265e9f

Browse files
Fix typo in check for value length
1 parent eb6bca6 commit 5265e9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

causal_testing/testing/causal_test_outcome.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Positive(SomeEffect):
9494
def apply(self, res: CausalTestResult) -> bool:
9595
if res.ci_valid() and not super().apply(res):
9696
return False
97-
if len(res.test_value.value > 0):
97+
if len(res.test_value.value) > 1:
9898
raise ValueError("Positive Effects are currently only supported on single float datatypes")
9999
if res.test_value.type in {"ate", "coefficient"}:
100100
return bool(res.test_value.value[0] > 0)
@@ -109,7 +109,7 @@ class Negative(SomeEffect):
109109
def apply(self, res: CausalTestResult) -> bool:
110110
if res.ci_valid() and not super().apply(res):
111111
return False
112-
if len(res.test_value.value > 0):
112+
if len(res.test_value.value) > 1:
113113
raise ValueError("Negative Effects are currently only supported on single float datatypes")
114114
if res.test_value.type in {"ate", "coefficient"}:
115115
return bool(res.test_value.value[0] < 0)

0 commit comments

Comments
 (0)