equal_within_errors#

astropop.math.physical.equal_within_errors(qf1, qf2)#

Check if two QFloats are equal within errors.

Parameters:
qf1, qf2: `~astropop.math.QFloat`, `float` or `np.ndarray`

QFloats to compare.

Returns:
bool:

True if the numbers are equal within the uncertainties, (the difference is smaller then the sum of errors). False if they are different.

Notes

  • We consider two numbers equal within errors when number1 - number2 <= error1 + error2

  • Incompatible units means different numbers.