Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodv committed Apr 13, 2022
1 parent 092d657 commit 7462492
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kmodes/tests/test_kmodes.py
Expand Up @@ -571,8 +571,7 @@ def test_k_modes_sample_weight_unchanged(self):
def test_kmodes_fit_predict(self):
"""Test whether fit_predict interface works the same as fit and predict."""
kmodes = KModes(n_clusters=4, init='Cao', random_state=42)
sample_weight = np.zeros(TEST_DATA.shape[0])
sample_weight[0] = 1
sample_weight = [0.5] * TEST_DATA.shape[0]
data1 = kmodes.fit_predict(TEST_DATA, sample_weight=sample_weight)
data2 = kmodes.fit(TEST_DATA, sample_weight=sample_weight).predict(TEST_DATA)
assert_cluster_splits_equal(data1, data2)

0 comments on commit 7462492

Please sign in to comment.