Find local maxima
Description
A local maximum is the point that marks the transition between an increase and a decrease in a Series. The first and last values of the Series can never be a peak.
Usage
<Expr>$peak_max()
Value
Expr
See Also
$peak_min()
Examples
#> shape: (8, 1)
#> ┌─────┐
#> │ x │
#> │ --- │
#> │ f64 │
#> ╞═════╡
#> │ 1.0 │
#> │ 2.0 │
#> │ 3.0 │
#> │ 2.0 │
#> │ 3.0 │
#> │ 4.0 │
#> │ 5.0 │
#> │ 2.0 │
#> └─────┘
#> shape: (8, 2)
#> ┌─────┬──────────┐
#> │ x ┆ peak_max │
#> │ --- ┆ --- │
#> │ f64 ┆ bool │
#> ╞═════╪══════════╡
#> │ 1.0 ┆ false │
#> │ 2.0 ┆ false │
#> │ 3.0 ┆ true │
#> │ 2.0 ┆ false │
#> │ 3.0 ┆ false │
#> │ 4.0 ┆ false │
#> │ 5.0 ┆ true │
#> │ 2.0 ┆ false │
#> └─────┴──────────┘