Skip to content

Commit 7c7eb55

Browse files
author
Vianney Taquet
committed
Fix float to arrays
1 parent b01e01e commit 7c7eb55

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mapie/regression.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def fit(
546546
self.single_estimator_ = estimator
547547
y_pred = self.single_estimator_.predict(X)
548548
self.k_ = np.full(
549-
shape=(n_samples, 1), fill_value=np.nan, dtype="float"
549+
shape=(n_samples, 1), fill_value=np.nan, dtype=float
550550
)
551551
else:
552552
cv = cast(BaseCrossValidator, cv)
@@ -584,14 +584,14 @@ def fit(
584584
)
585585

586586
for i, val_ind in enumerate(val_indices):
587-
pred_matrix[val_ind, i] = np.array(predictions[i])
587+
pred_matrix[val_ind, i] = np.array(
588+
predictions[i], dtype=float
589+
)
588590
self.k_[val_ind, i] = 1
589591
check_nan_in_aposteriori_prediction(pred_matrix)
590592

591593
y_pred = aggregate_all(agg_function, pred_matrix)
592594

593-
# if self.conformity_score_function_.consistency_check:
594-
# self.conformity_score_function_.check_consistency(y, y_pred)
595595
self.conformity_scores_ = (
596596
self.conformity_score_function_.get_conformity_scores(y, y_pred)
597597
)

0 commit comments

Comments
 (0)