MCPcopy Index your code
hub / github.com/numpy/numpy / ptp

Function ptp

numpy/ma/core.py:7034–7042  ·  view source on GitHub ↗
(obj, axis=None, out=None, fill_value=None, keepdims=np._NoValue)

Source from the content-addressed store, hash-verified

7032
7033
7034def ptp(obj, axis=None, out=None, fill_value=None, keepdims=np._NoValue):
7035 kwargs = {} if keepdims is np._NoValue else {'keepdims': keepdims}
7036 try:
7037 return obj.ptp(axis, out=out, fill_value=fill_value, **kwargs)
7038 except (AttributeError, TypeError):
7039 # If obj doesn't have a ptp method or if the method doesn't accept
7040 # a fill_value argument
7041 return asanyarray(obj).ptp(axis=axis, fill_value=fill_value,
7042 out=out, **kwargs)
7043
7044
7045ptp.__doc__ = MaskedArray.ptp.__doc__

Callers

nothing calls this directly

Calls 2

asanyarrayFunction · 0.85
ptpMethod · 0.45

Tested by

no test coverage detected