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

Skip to content

Commit 6b820a8

Browse files
committed
refactor: made changes as suggested by reviewer
1 parent c35268f commit 6b820a8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/matplotlib/scale.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
""" # noqa: E501
3131

3232
import inspect
33+
import math
3334
import textwrap
3435
from functools import wraps
3536

3637
import numpy as np
37-
import math
3838

3939
import matplotlib as mpl
4040
from matplotlib import _api, _docstring
@@ -429,7 +429,7 @@ def val_in_range(self, val):
429429
"""
430430
Return whether the value is within the valid range for this scale.
431431
432-
This is True for value(s) > 0 except +inf.
432+
This is True for value(s) > 0 except +inf and NaN.
433433
"""
434434
return math.isfinite(val) and val > 0
435435

@@ -875,7 +875,7 @@ def val_in_range(self, val):
875875
876876
This is True for value(s) which are between 0 and 1 (excluded).
877877
"""
878-
return (val > 0) and (val < 1)
878+
return 0 < val < 1
879879

880880

881881
_scale_mapping = {

0 commit comments

Comments
 (0)