From 2d95601c5a853605c2f4d10e1c724dd6281a1f91 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Tue, 5 Jul 2016 18:35:40 +0200 Subject: [PATCH] Fix: max_abs_error should be a scalar --- .../python/cartodb_services/cartodb_services/mapzen/isolines.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py b/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py index 0e89ef4..f6f50aa 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py @@ -49,7 +49,7 @@ class MapzenIsolines: # iterate to refine the first solution, if needed for i in xrange(0, self.MAX_ITERS): errors = [(cost - isorange) / float(isorange) for cost in costs] - max_abs_error = [abs(e) for e in errors] + max_abs_error = max([abs(e) for e in errors]) if max_abs_error <= self.TOLERANCE: # good enough, stop there break