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

Skip to content

Commit a9af431

Browse files
committed
(try) fix(ing) an exception about raising an int to a negative power
1 parent 556ec20 commit a9af431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/ticker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ def format_eng(self, num):
12781278

12791279
pow10 = np.clip(pow10, min(self.ENG_PREFIXES), max(self.ENG_PREFIXES))
12801280

1281-
mant = sign * dnum / (10 ** pow10)
1281+
mant = sign * dnum / (10.0 ** pow10)
12821282
# Taking care of the cases like 999.9..., which
12831283
# may be rounded to 1000 instead of 1 k.
12841284
if (self.places is not None and

0 commit comments

Comments
 (0)