MCPcopy Index your code
hub / github.com/plotly/plotly.py / is_natural

Function is_natural

_plotly_utils/png.py:2220–2226  ·  view source on GitHub ↗

A non-negative integer.

(x)

Source from the content-addressed store, hash-verified

2218
2219
2220def is_natural(x):
2221 """A non-negative integer."""
2222 try:
2223 is_integer = int(x) == x
2224 except (TypeError, ValueError):
2225 return False
2226 return is_integer and x >= 0
2227
2228
2229def undo_filter_sub(filter_unit, scanline, previous, result):

Callers 2

check_colorFunction · 0.85
__init__Method · 0.85

Calls 1

intFunction · 0.85

Tested by

no test coverage detected