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

Skip to content

Commit 9bf681e

Browse files
committed
removing typecasting method to float
1 parent 07c43e4 commit 9bf681e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/contour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,8 +1447,8 @@ def _contour_args(self, args, kwargs):
14471447
else:
14481448
raise _api.nargs_error(fn, takes="from 1 to 4", given=nargs)
14491449
z = ma.masked_invalid(z, copy=False)
1450-
self.zmax = float(z.max())
1451-
self.zmin = float(z.min())
1450+
self.zmax = z.max().astype(float)
1451+
self.zmin = z.min().astype(float)
14521452
if self.logscale and self.zmin <= 0:
14531453
z = ma.masked_where(z <= 0, z)
14541454
_api.warn_external('Log scale: values of z <= 0 have been masked')

0 commit comments

Comments
 (0)