MCPcopy Create free account
hub / github.com/numpy/numpy / _check_nonneg_int

Function _check_nonneg_int

numpy/lib/_npyio_impl.py:830–836  ·  view source on GitHub ↗
(value, name="argument")

Source from the content-addressed store, hash-verified

828
829
830def _check_nonneg_int(value, name="argument"):
831 try:
832 operator.index(value)
833 except TypeError:
834 raise TypeError(f"{name} must be an integer") from None
835 if value < 0:
836 raise ValueError(f"{name} must be nonnegative")
837
838
839def _preprocess_comments(iterable, comments, encoding):

Callers 1

_readFunction · 0.85

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…