Skip to content

Commit

Permalink
fix disjoint crossfold test for pandas 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Mar 3, 2024
1 parent 6a9fadd commit c206378
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_crossfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
# Licensed under the MIT license, see LICENSE.md for details.
# SPDX-License-Identifier: MIT

import itertools as it
import functools as ft
import pytest
import itertools as it
import math

import numpy as np

import lenskit.util.test as lktu
import pytest

import lenskit.crossfold as xf
import lenskit.util.test as lktu


def test_partition_rows():
Expand Down Expand Up @@ -104,7 +104,7 @@ def test_sample_non_disjoint():

# 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)
(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]
Expand Down

0 comments on commit c206378

Please sign in to comment.