Skip to content

Commit

Permalink
Fix polars deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
qubixes committed Oct 13, 2023
1 parent bb36561 commit 7df7b38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
]

dependencies = [
"polars>=0.14.17",
"polars>=0.19.8",
"numpy>=1.20",
]

Expand Down
2 changes: 1 addition & 1 deletion regexmodel/regexclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def score(series: pl.Series, regex: BaseRegex, count_thres: int,
n_unique = regex.n_possible
else:
n_unique = len(first_char.drop_nulls().unique())
avg_len_next = next_series.drop_nulls().str.lengths().mean()
avg_len_next = next_series.drop_nulls().str.len_chars().mean()
if (next_not_null == 0 or next_not_null < count_thres or avg_len_next is None):
return 0, next_series, first_char
fraction_match = next_not_null/cur_not_null
Expand Down

0 comments on commit 7df7b38

Please sign in to comment.