diff --git a/folium/colormap.py b/folium/colormap.py index 1d1e0d8759..bc8b9e73d1 100644 --- a/folium/colormap.py +++ b/folium/colormap.py @@ -6,6 +6,8 @@ Utility module for dealing with colormaps. """ +from __future__ import absolute_import + import math from jinja2 import Template from folium.six import text_type, binary_type @@ -365,7 +367,7 @@ def __init__(self, colors, index=None, vmin=0., vmax=1., caption=""): if index is None: self.index = [vmin + (vmax-vmin)*i*1./(n-1) for i in range(n)] else: - self.index = list(index).copy() + self.index = [x for x in index] self.colors = [_parse_color(x) for x in colors] def rgba_floats_tuple(self, x): @@ -525,7 +527,7 @@ def __init__(self, colors, index=None, vmin=0., vmax=1., caption=""): if index is None: self.index = [vmin + (vmax-vmin)*i*1./n for i in range(n+1)] else: - self.index = list(index).copy() + self.index = [x for x in index] self.colors = [_parse_color(x) for x in colors] def rgba_floats_tuple(self, x):