smpl.stat.is_monotone
- smpl.stat.is_monotone(f, tmin=None, tmax=None, steps=1000)[source]
Test if function
f
is monotone.Parameters
- ffunction
Function to be tested.
- testarray_like
Test points.
Returns
- bool
True if function is monotone.
Examples
>>> def f(x): ... return x**2 >>> is_monotone(f) False >>> is_monotone(np.exp) True