fix formatting of query

This commit is contained in:
Andy Eschbacher 2016-06-27 10:09:13 -04:00
parent 3e01470aa0
commit c799f4d73b

View File

@ -146,9 +146,6 @@ def predict_segment(model, features, target_query):
results.append(prediction)
cartodb_ids = plpy.execute('''
SELECT array_agg(cartodb_id ORDER BY cartodb_id) As cartodb_ids
FROM ({0}) As a
'''.format(target_query))[0]['cartodb_ids']
cartodb_ids = plpy.execute('''SELECT array_agg(cartodb_id ORDER BY cartodb_id) As cartodb_ids FROM ({0}) As a'''.format(target_query))[0]['cartodb_ids']
return cartodb_ids, np.concatenate(results)