From 07ae17770e1e839d2239890e20be6a132a46a377 Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Mon, 25 Mar 2024 11:20:51 +0800 Subject: [PATCH] Fix/don't return empty dataframe in outlier filter (#95) --- pyproject.toml | 2 +- src/fsrs_optimizer/fsrs_optimizer.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 43c1b5a..138e052 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "FSRS-Optimizer" -version = "4.26.6" +version = "4.26.7" readme = "README.md" dependencies = [ "matplotlib>=3.7.0", diff --git a/src/fsrs_optimizer/fsrs_optimizer.py b/src/fsrs_optimizer/fsrs_optimizer.py index b7d4f2d..3a795a2 100644 --- a/src/fsrs_optimizer/fsrs_optimizer.py +++ b/src/fsrs_optimizer/fsrs_optimizer.py @@ -427,8 +427,6 @@ def remove_outliers(group: pd.DataFrame) -> pd.DataFrame: ).index total = sum(grouped_group[("y", "count")]) - if total <= 20: - return pd.DataFrame() has_been_removed = 0 for i in sort_index: count = grouped_group.loc[i, ("y", "count")]