File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ def __init__(
113
113
.first ()
114
114
.reset_index ()
115
115
)
116
- assert not self .x_pred_control .empty
116
+ if self .x_pred_control .empty :
117
+ raise ValueError ("x_pred_control is empty" )
117
118
(new_x ,) = build_design_matrices ([self ._x_design_info ], self .x_pred_control )
118
119
self .y_pred_control = self .model .predict (np .asarray (new_x ))
119
120
@@ -129,7 +130,8 @@ def __init__(
129
130
.first ()
130
131
.reset_index ()
131
132
)
132
- assert not self .x_pred_treatment .empty
133
+ if self .x_pred_treatment .empty :
134
+ raise ValueError ("x_pred_treatment is empty" )
133
135
(new_x ,) = build_design_matrices ([self ._x_design_info ], self .x_pred_treatment )
134
136
self .y_pred_treatment = self .model .predict (np .asarray (new_x ))
135
137
@@ -148,7 +150,8 @@ def __init__(
148
150
.first ()
149
151
.reset_index ()
150
152
)
151
- assert not self .x_pred_counterfactual .empty
153
+ if self .x_pred_counterfactual .empty :
154
+ raise ValueError ("x_pred_counterfactual is empty" )
152
155
(new_x ,) = build_design_matrices (
153
156
[self ._x_design_info ], self .x_pred_counterfactual , return_type = "dataframe"
154
157
)
You can’t perform that action at this time.
0 commit comments