From f800a35fd16ccab47e5417b9f6fdd8f277bba272 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Tue, 18 Oct 2016 13:01:31 -0600 Subject: [PATCH] new format for input data --- src/py/crankshaft/test/test_clustering_kmeans.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/py/crankshaft/test/test_clustering_kmeans.py b/src/py/crankshaft/test/test_clustering_kmeans.py index 0d531ab..8ab300d 100644 --- a/src/py/crankshaft/test/test_clustering_kmeans.py +++ b/src/py/crankshaft/test/test_clustering_kmeans.py @@ -23,7 +23,12 @@ class KMeansTest(unittest.TestCase): "no_clusters": "10"} def test_kmeans(self): - data = self.cluster_data + """ + """ + data = [{'xs': d['xs'], + 'ys': d['ys'], + 'id': d['id']} for d in self.cluster_data] + plpy._define_result('select', data) clusters = cc.kmeans('subquery', 2) labels = [a[1] for a in clusters]