Skip to content

Commit

Permalink
Update econml/iv/dml/_dml.py
Browse files Browse the repository at this point in the history
Co-authored-by: Keith Battocchi <[email protected]>
Signed-off-by: Roni Kobrosly <[email protected]>
  • Loading branch information
ronikobrosly and kbattocchi authored Sep 27, 2024
1 parent 70cc2dd commit f013ed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion econml/iv/dml/_dml.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ def predict(self, Y, T, X=None, W=None, Z=None, sample_weight=None, groups=None)
TX_pred = np.tile(TX_pred.reshape(1, -1), (T.shape[0], 1))
Y_res = Y - Y_pred.reshape(Y.shape)
T_res = TXZ_pred.reshape(T.shape) - TX_pred.reshape(T.shape)
if T_res.sum() == 0:
if not T_res.any():
raise ValueError(
"""
All values of the treatment residual are 0,
Expand Down

0 comments on commit f013ed5

Please sign in to comment.