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

Skip to content

Commit c35268f

Browse files
committed
refactor: compact function body in LogScale
1 parent 3de6b1f commit c35268f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/matplotlib/scale.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,7 @@ def val_in_range(self, val):
431431
432432
This is True for value(s) > 0 except +inf.
433433
"""
434-
if not math.isfinite(val):
435-
return False
436-
else:
437-
return val > 0
434+
return math.isfinite(val) and val > 0
438435

439436

440437
class FuncScaleLog(LogScale):

0 commit comments

Comments
 (0)