Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions folium/colormap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down