Skip to content

Commit

Permalink
enforce positive
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez committed Nov 11, 2024
1 parent 328c7b5 commit 7367581
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mlforecast/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def _transform(
if (
self.keep_last_n is None
and update_samples
and all(samples > -1 for samples in update_samples)
and all(samples > 0 for samples in update_samples)
):
# user didn't set keep_last_n and we can infer it from the transforms
self.keep_last_n = max(update_samples)
Expand Down
2 changes: 1 addition & 1 deletion nbs/core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@
" if (\n",
" self.keep_last_n is None\n",
" and update_samples\n",
" and all(samples > -1 for samples in update_samples)\n",
" and all(samples > 0 for samples in update_samples)\n",
" ):\n",
" # user didn't set keep_last_n and we can infer it from the transforms\n",
" self.keep_last_n = max(update_samples)\n",
Expand Down

0 comments on commit 7367581

Please sign in to comment.