Skip to content

Commit 1f26890

Browse files
committed
adding scipy test
1 parent 8c3fbb2 commit 1f26890

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

testapps/on_device_unit_tests/test_app/tests/test_requirements.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ def test_run_module(self):
1212
arr = np.random.random((3, 3))
1313
det = np.linalg.det(arr)
1414

15+
class ScipyTestCase(PythonTestMixIn, TestCase):
16+
module_import = 'scipy'
17+
18+
def test_run_module(self):
19+
import numpy as np
20+
from scipy.cluster.vq import vq, kmeans, whiten
21+
features = np.array([[ 1.9,2.3],
22+
[ 1.5,2.5],
23+
[ 0.8,0.6],
24+
[ 0.4,1.8],
25+
[ 0.1,0.1],
26+
[ 0.2,1.8],
27+
[ 2.0,0.5],
28+
[ 0.3,1.5],
29+
[ 1.0,1.0]])
30+
whitened = whiten(features)
31+
book = np.array((whitened[0],whitened[2]))
32+
print('kmeans', kmeans(whitened,book))
33+
1534

1635
class OpensslTestCase(PythonTestMixIn, TestCase):
1736
module_import = '_ssl'

0 commit comments

Comments
 (0)