Remove _cdb_crankshaft_activate_py activation call from kmeans function

This commit is contained in:
Raul Ochoa 2016-06-16 14:12:28 +02:00
parent a222341863
commit d08a2b6d2d

View File

@ -1,8 +1,6 @@
CREATE OR REPLACE FUNCTION CDB_KMeans(query text, no_clusters integer,no_init integer default 20) CREATE OR REPLACE FUNCTION CDB_KMeans(query text, no_clusters integer,no_init integer default 20)
RETURNS table (cartodb_id integer, cluster_no integer) as $$ RETURNS table (cartodb_id integer, cluster_no integer) as $$
import plpy
plpy.execute('SELECT cdb_crankshaft._cdb_crankshaft_activate_py()')
from crankshaft.clustering import kmeans from crankshaft.clustering import kmeans
return kmeans(query,no_clusters,no_init) return kmeans(query,no_clusters,no_init)