From f369cc916675111f9a79d8dca2e00d9c8b66888a Mon Sep 17 00:00:00 2001 From: Michael Ekstrand Date: Sun, 21 Jan 2024 20:31:26 -0500 Subject: [PATCH] fix DF set index --- tests/test_crossfold.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_crossfold.py b/tests/test_crossfold.py index 04efadb53..71d79ed1e 100644 --- a/tests/test_crossfold.py +++ b/tests/test_crossfold.py @@ -97,7 +97,7 @@ def test_sample_non_disjoint(): assert len(test_idx.intersection(train_idx)) == 0 # There are enough splits & items we should pick at least one duplicate - ipairs = ((s1.test.set_index('user', 'item').index, s2.test.set_index('user', 'item').index) + ipairs = ((s1.test.set_index(['user', 'item']).index, s2.test.set_index(['user', 'item']).index) for (s1, s2) in it.product(splits, splits)) isizes = [len(i1.intersection(i2)) for (i1, i2) in ipairs] assert any(n > 0 for n in isizes)