@@ -81,21 +81,13 @@ def _return_causal_test_results(self, estimator) -> CausalTestResult:
81
81
if not hasattr (estimator , f"estimate_{ self .estimate_type } " ):
82
82
raise AttributeError (f"{ estimator .__class__ } has no { self .estimate_type } method." )
83
83
estimate_effect = getattr (estimator , f"estimate_{ self .estimate_type } " )
84
- try :
85
- effect , confidence_intervals = estimate_effect (** self .estimate_params )
86
- return CausalTestResult (
87
- estimator = estimator ,
88
- test_value = TestValue (self .estimate_type , effect ),
89
- effect_modifier_configuration = self .effect_modifier_configuration ,
90
- confidence_intervals = confidence_intervals ,
91
- )
92
- except np .linalg .LinAlgError :
93
- return CausalTestResult (
94
- estimator = estimator ,
95
- test_value = TestValue (self .estimate_type , None ),
96
- effect_modifier_configuration = self .effect_modifier_configuration ,
97
- confidence_intervals = None ,
98
- )
84
+ effect , confidence_intervals = estimate_effect (** self .estimate_params )
85
+ return CausalTestResult (
86
+ estimator = estimator ,
87
+ test_value = TestValue (self .estimate_type , effect ),
88
+ effect_modifier_configuration = self .effect_modifier_configuration ,
89
+ confidence_intervals = confidence_intervals ,
90
+ )
99
91
100
92
def __str__ (self ):
101
93
treatment_config = {self .treatment_variable .name : self .treatment_value }
0 commit comments