File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ class Positive(SomeEffect):
94
94
def apply (self , res : CausalTestResult ) -> bool :
95
95
if res .ci_valid () and not super ().apply (res ):
96
96
return False
97
+ if len (res .test_value .value > 0 ):
98
+ raise ValueError ("Positive Effects are currently only supported on single float datatypes" )
97
99
if res .test_value .type in {"ate" , "coefficient" }:
98
100
return bool (res .test_value .value [0 ] > 0 )
99
101
if res .test_value .type == "risk_ratio" :
@@ -107,6 +109,8 @@ class Negative(SomeEffect):
107
109
def apply (self , res : CausalTestResult ) -> bool :
108
110
if res .ci_valid () and not super ().apply (res ):
109
111
return False
112
+ if len (res .test_value .value > 0 ):
113
+ raise ValueError ("Negative Effects are currently only supported on single float datatypes" )
110
114
if res .test_value .type in {"ate" , "coefficient" }:
111
115
return bool (res .test_value .value [0 ] < 0 )
112
116
if res .test_value .type == "risk_ratio" :
You can’t perform that action at this time.
0 commit comments