@@ -1130,7 +1130,7 @@ def changed(self):
1130
1130
# add label colors
1131
1131
cm .ScalarMappable .changed (self )
1132
1132
1133
- def _autolev (self , z , N ):
1133
+ def _autolev (self , N ):
1134
1134
"""
1135
1135
Select contour levels to span the data.
1136
1136
@@ -1166,12 +1166,12 @@ def _contour_level_args(self, z, args):
1166
1166
self ._auto = False
1167
1167
if self .levels is None :
1168
1168
if len (args ) == 0 :
1169
- lev = self ._autolev (z , 7 )
1169
+ lev = self ._autolev (7 )
1170
1170
else :
1171
1171
level_arg = args [0 ]
1172
1172
try :
1173
1173
if type (level_arg ) == int :
1174
- lev = self ._autolev (z , level_arg )
1174
+ lev = self ._autolev (level_arg )
1175
1175
else :
1176
1176
lev = np .asarray (level_arg ).astype (np .float64 )
1177
1177
except :
@@ -1531,12 +1531,12 @@ def _contour_args(self, args, kwargs):
1531
1531
raise TypeError ("Too many arguments to %s; see help(%s)" %
1532
1532
(fn , fn ))
1533
1533
z = ma .masked_invalid (z , copy = False )
1534
- self .zmax = ma . maximum ( z )
1535
- self .zmin = ma . minimum ( z )
1534
+ self .zmax = float ( z . max () )
1535
+ self .zmin = float ( z . min () )
1536
1536
if self .logscale and self .zmin <= 0 :
1537
1537
z = ma .masked_where (z <= 0 , z )
1538
1538
warnings .warn ('Log scale: values of z <= 0 have been masked' )
1539
- self .zmin = z .min ()
1539
+ self .zmin = float ( z .min () )
1540
1540
self ._contour_level_args (z , args )
1541
1541
return (x , y , z )
1542
1542
0 commit comments