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

Skip to content

Commit b910468

Browse files
committed
fixed bug in norms for degenerate case, vmin==vmax
svn path=/trunk/matplotlib/; revision=3192
1 parent 13094de commit b910468

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/colors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def __call__(self, value, clip=None):
598598
if vmin > vmax:
599599
raise ValueError("minvalue must be less than or equal to maxvalue")
600600
elif vmin==vmax:
601-
return 0.*value
601+
return 0.0 * val
602602
else:
603603
if clip:
604604
mask = ma.getmask(val)
@@ -659,7 +659,7 @@ def __call__(self, value, clip=None):
659659
elif vmin<=0:
660660
raise ValueError("values must all be positive")
661661
elif vmin==vmax:
662-
return 0.*value
662+
return 0.0 * val
663663
else:
664664
if clip:
665665
mask = ma.getmask(val)

0 commit comments

Comments
 (0)