pwtools.num.findmin

pwtools.num.findmin(x, y)[source]

Find minimum of x-y curve by searching for the root of the 1st derivative of a spline thru x,y. x must be sorted min -> max and the interval [x[0], x[-1]] must contain the minimum.

This is intended for quick interactive work. For working with pre-calculated splines, see Spline.

Parameters:
  • x (1d arrays) –

  • y (1d arrays) –

Return type:

array([x0, y(x0)])