MCPcopy
hub / github.com/numpy/numpy / _ptp

Function _ptp

numpy/lib/_histograms_impl.py:22–29  ·  view source on GitHub ↗

Peak-to-peak value of x. This implementation avoids the problem of signed integer arrays having a peak-to-peak value that cannot be represented with the array's data type. This function returns an unsigned value for signed integer arrays.

(x)

Source from the content-addressed store, hash-verified

20
21
22def _ptp(x):
23 """Peak-to-peak value of x.
24
25 This implementation avoids the problem of signed integer arrays having a
26 peak-to-peak value that cannot be represented with the array's data type.
27 This function returns an unsigned value for signed integer arrays.
28 """
29 return _unsigned_subtract(x.max(), x.min())
30
31
32def _hist_bin_sqrt(x, range):

Callers 5

_hist_bin_sqrtFunction · 0.70
_hist_bin_sturgesFunction · 0.70
_hist_bin_riceFunction · 0.70
_hist_bin_stoneFunction · 0.70
_hist_bin_doaneFunction · 0.70

Calls 3

_unsigned_subtractFunction · 0.85
maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…