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

Function _none_or_positive_arg

numpy/core/arrayprint.py:898–903  ·  view source on GitHub ↗
(x, name)

Source from the content-addressed store, hash-verified

896 recurser = None
897
898def _none_or_positive_arg(x, name):
899 if x is None:
900 return -1
901 if x < 0:
902 raise ValueError("{} must be >= 0".format(name))
903 return x
904
905class FloatingFormat:
906 """ Formatter for subtypes of np.floating """

Callers 3

__init__Method · 0.85
format_float_scientificFunction · 0.85
format_float_positionalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected