Calculate the relative maxima of data.
New in version 0.11.0.
Parameters: | data : ndarray
axis : int, optional
order : int, optional
mode : str, optional
|
---|---|
Returns: | extrema : tuple of ndarrays
|
See also
Notes
This function uses argrelextrema with np.greater as comparator.
Examples
>>> x = np.array([2, 1, 2, 3, 2, 0, 1, 0])
>>> argrelmax(x)
(array([3, 6]),)
>>> y = np.array([[1, 2, 1, 2],
... [2, 2, 0, 0],
... [5, 3, 4, 4]])
...
>>> argrelmax(y, axis=1)
(array([0]), array([1]))