find_closest

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