Skip to content

Commit 98ca09f

Browse files
authored
Add smoke test for sklearnex (#1143)
sklearnex was added in #1135 http://227237481
1 parent f4d7262 commit 98ca09f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_sklearnex.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import unittest
2+
3+
import numpy as np
4+
5+
class TestSklearnex(unittest.TestCase):
6+
def test_dbscan(self):
7+
from sklearnex.cluster import DBSCAN
8+
X = np.array([[1., 2.], [2., 2.], [2., 3.],
9+
[8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
10+
11+
clustering = DBSCAN(eps=3, min_samples=2).fit(X)
12+
np.testing.assert_array_equal(np.array([0, 0, 0, 1, 1, -1]), clustering.labels_)

0 commit comments

Comments
 (0)