Skip to content

Commit

Permalink
FIX: add warnings and better indent
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault Cordier committed Dec 21, 2023
1 parent 5a1c3ab commit b4c3029
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mapie/regression/time_series_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from typing import Iterable, Optional, Tuple, Union, cast

import warnings

import numpy as np
from sklearn.base import RegressorMixin
from sklearn.model_selection import BaseCrossValidator
Expand Down Expand Up @@ -159,12 +161,12 @@ def partial_fit(
the length of the training set.
"""
warnings.warn(
"WARNING: Deprecated method. "
+ "The method \"partial_fit\" is outdated. "
+ "Prefer to use \"update\" instead to keep "
+ "the same behavior in the future.",
DeprecationWarning
)
"WARNING: Deprecated method. "
+ "The method \"partial_fit\" is outdated. "
+ "Prefer to use \"update\" instead to keep "
+ "the same behavior in the future.",
DeprecationWarning
)
check_is_fitted(self, self.fit_attributes)
X, y = cast(NDArray, X), cast(NDArray, y)
m, n = len(X), len(self.conformity_scores_)
Expand Down

0 comments on commit b4c3029

Please sign in to comment.