MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _decade_greater

Function _decade_greater

lib/matplotlib/ticker.py:2381–2392  ·  view source on GitHub ↗

Return the smallest integer power of *base* that's greater than *x*. If *x* is negative, the exponent will be *smaller*.

(x, base)

Source from the content-addressed store, hash-verified

2379
2380
2381def _decade_greater(x, base):
2382 """
2383 Return the smallest integer power of *base* that's greater than *x*.
2384
2385 If *x* is negative, the exponent will be *smaller*.
2386 """
2387 if x < 0:
2388 return -_decade_less(-x, base)
2389 greater = _decade_greater_equal(x, base)
2390 if greater == x:
2391 greater *= base
2392 return greater
2393
2394
2395def _is_close_to_int(x):

Callers 3

_decade_lessFunction · 0.85
nonsingularMethod · 0.85
view_limitsMethod · 0.85

Calls 2

_decade_lessFunction · 0.85
_decade_greater_equalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…