skrf.mathFunctions.find_closest

skrf.mathFunctions.find_closest(z1, z2, z_approx)[source]

Return z1 or z2 depending on which is closer to z_approx.

Parameters:
  • z1 (array-like) – root 1

  • z2 (array-like) – root 2

  • z_approx (array-like) – approximate answer of z

Returns:

z3 – array built from z1 and z2

Return type:

np.array