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

Skip to content

Commit a8aa115

Browse files
committed
Merged revisions 7970 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint ........ r7970 | efiring | 2009-11-16 13:49:11 -1000 (Mon, 16 Nov 2009) | 4 lines Fix Normalize bug: ensure scalar output for scalar input. This bug was causing a bug in clabel with a single contour level, as reported by Brendan Arnold. ........ svn path=/trunk/matplotlib/; revision=7971
1 parent 687fe27 commit a8aa115

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
@@ -794,7 +794,7 @@ def __call__(self, value, clip=None):
794794
if vmin > vmax:
795795
raise ValueError("minvalue must be less than or equal to maxvalue")
796796
elif vmin==vmax:
797-
return 0.0 * val
797+
result = 0.0 * val
798798
else:
799799
if clip:
800800
mask = ma.getmask(val)
@@ -855,7 +855,7 @@ def __call__(self, value, clip=None):
855855
elif vmin<=0:
856856
raise ValueError("values must all be positive")
857857
elif vmin==vmax:
858-
return 0.0 * val
858+
result = 0.0 * val
859859
else:
860860
if clip:
861861
mask = ma.getmask(val)

0 commit comments

Comments
 (0)