Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit de39757

Browse files
author
Jeff Whitaker
committed
make sure integer division is not used.
svn path=/trunk/matplotlib/; revision=2089
1 parent f5edbfb commit de39757

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ def __call__(self, value):
656656
else:
657657
if self.clip:
658658
val = clip(val.filled(vmax), vmin, vmax)
659-
result = (val-vmin)/(vmax-vmin)
659+
result = (val-vmin)/float(vmax-vmin)
660660
if vtype == 'scalar':
661661
result = result[0]
662662
return result

0 commit comments

Comments
 (0)