Skip to content

Commit 36c8c7d

Browse files
author
Vianney Taquet
committed
Fix CI
1 parent 9e603e5 commit 36c8c7d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mapie/estimators.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,7 @@ def _fit_and_predict_oof_model(
403403
- [3]: Validation data indices, of shapes (n_samples_val,)
404404
"""
405405
X_train, y_train, X_val = X[train_index], y[train_index], X[val_index]
406-
sample_weight_train = sample_weight.copy()
407-
if sample_weight is not None:
408-
sample_weight_train = sample_weight[train_index]
406+
sample_weight_train = sample_weight[train_index] if sample_weight is not None else None
409407
estimator = self._fit_estimator(estimator, X_train, y_train, supports_sw, sample_weight_train)
410408
y_pred = estimator.predict(X_val)
411409
val_id = np.full_like(y_pred, k)

0 commit comments

Comments
 (0)