File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2079,13 +2079,13 @@ def decade_up(x, base=10):
2079
2079
return base ** lx
2080
2080
2081
2081
2082
- def is_decade (x , base = 10 ):
2082
+ def is_decade (x , base = 10 , * , rtol = 1e-10 ):
2083
2083
if not np .isfinite (x ):
2084
2084
return False
2085
2085
if x == 0.0 :
2086
2086
return True
2087
2087
lx = np .log (np .abs (x )) / np .log (base )
2088
- return is_close_to_int (lx )
2088
+ return is_close_to_int (lx , atol = rtol )
2089
2089
2090
2090
2091
2091
def _decade_less_equal (x , base ):
@@ -2138,8 +2138,8 @@ def _decade_greater(x, base):
2138
2138
return greater
2139
2139
2140
2140
2141
- def is_close_to_int (x ):
2142
- return abs (x - np .round (x )) < 1e-10
2141
+ def is_close_to_int (x , * , atol = 1e-10 ):
2142
+ return abs (x - np .round (x )) < atol
2143
2143
2144
2144
2145
2145
class LogLocator (Locator ):
You can’t perform that action at this time.
0 commit comments