pwtools.num.findroot

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

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

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)])