ffsim.approx_eq

ffsim.approx_eq(obj, other, rtol=1e-05, atol=1e-08)[source]

Return whether two objects are approximately equal.

See the documentation of np.isclose for the interpretation of the tolerance parameters rtol and atol.

Parameters:
  • obj (Any) – The first object.

  • other (Any) – The object to compare to.

  • rtol (float) – Relative numerical tolerance.

  • atol (float) – Absolute numerical tolerance.

Return type:

bool

Returns:

True if the objects are approximately equal up to the specified tolerance, and False otherwise.