Skip to content

Commit

Permalink
Correct some of the Scikit-learn stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainpiot committed May 3, 2024
1 parent 458264b commit a47d164
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stubs/sklearn/metrics/_classification.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def precision_recall_fscore_support(
labels: None | ArrayLike = None,
pos_label: str | int = 1,
average: None | Literal["binary", "micro", "macro", "samples", "weighted"] = None,
warn_for: set | tuple = ...,
warn_for: list | set | tuple = ...,
sample_weight: None | ArrayLike = None,
zero_division: Literal["warn", "warn"] | int = "warn",
) -> tuple[float | ndarray, float | ndarray, float | ndarray, None | ndarray]: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/sklearn/model_selection/_split.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class _CVIterableWrapper(BaseCrossValidator):
def split(self, X: Any = None, y: Any = None, groups: Any = None): ...

def check_cv(
cv: Iterable | int | BaseShuffleSplit | BaseCrossValidator = 5,
cv: Iterable | int | BaseShuffleSplit | BaseCrossValidator | None = 5,
y: None | ArrayLike = None,
*,
classifier: bool = False,
Expand Down
4 changes: 2 additions & 2 deletions stubs/sklearn/utils/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def resample(
n_samples: None | Int = None,
random_state: RandomState | None | Int = None,
stratify: None | MatrixLike | ArrayLike = None,
) -> list[ndarray]: ...
def shuffle(*arrays, random_state: RandomState | None | Int = None, n_samples: None | Int = None) -> list[SupportsIndex]: ...
) -> list[ndarray] | None: ...
def shuffle(*arrays, random_state: RandomState | None | Int = None, n_samples: None | Int = None) -> list[SupportsIndex] | None: ...
def safe_sqr(X: MatrixLike | ArrayLike, *, copy: bool = True) -> ndarray: ...
def gen_batches(n: Int, batch_size: Int, *, min_batch_size: Int = 0) -> Iterator[slice]: ...
def gen_even_slices(n: Int, n_packs: Int, *, n_samples: None | Int = None) -> Iterator[slice]: ...
Expand Down

0 comments on commit a47d164

Please sign in to comment.