Skip to content

Commit

Permalink
fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jul 31, 2024
1 parent 9b50ca2 commit e79fdae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lenskit/lenskit/splitting/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def sample_records(
We can loop over a sequence of train-test pairs::
>>> from lenskit.data.movielens import load_movielens_df
>>> ratings = load_movielens_df('data/ml-latest-small')
>>> for train, test in sample_records(ratings, 1000, repeats=5):
>>> movielens = load_movielens('data/ml-latest-small')
>>> for train, test in sample_records(movielens, 1000, repeats=5):
... print(sum(len(il) for il in test.values()))
1000
1000
Expand All @@ -100,7 +100,7 @@ def sample_records(
Sometimes for testing, it is useful to just get a single pair::
>>> train, test = sample_records(ratings, 1000)
>>> train, test = sample_records(movielens, 1000)
>>> sum(len(il) for il in test.values())
1000
Expand Down

0 comments on commit e79fdae

Please sign in to comment.