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

Function ptp

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

Source from the content-addressed store, hash-verified

6825
6826
6827def ptp(obj, axis=None, out=None, fill_value=None, keepdims=np._NoValue):
6828 kwargs = {} if keepdims is np._NoValue else {'keepdims': keepdims}
6829 try:
6830 return obj.ptp(axis, out=out, fill_value=fill_value, **kwargs)
6831 except (AttributeError, TypeError):
6832 # If obj doesn't have a ptp method or if the method doesn't accept
6833 # a fill_value argument
6834 return asanyarray(obj).ptp(axis=axis, fill_value=fill_value,
6835 out=out, **kwargs)
6836ptp.__doc__ = MaskedArray.ptp.__doc__
6837
6838

Callers

nothing calls this directly

Calls 2

asanyarrayFunction · 0.85
ptpMethod · 0.45

Tested by

no test coverage detected