assert_values_equal#
- lsst.images.tests.assert_values_equal(a, b, *, rtol=0.0, atol=0.0, equal_nan=True, label='')#
Assert that two arrays, quantities, or floats are equal or close.
On mismatch this raises an
AssertionErrorwith a concise report (count, max absolute difference, location, NaN-mismatch count) rather than dumping the arrays.- Parameters:
rtol (
float, default:0.0) – Relative tolerance.atol (
float|Quantity, default:0.0) – Absolute tolerance; aQuantityis converted to the unit ofa, or of the quantity-valued operand when only one operand has a unit.equal_nan (
bool, default:True) – IfTrue, treat NaN as equal to NaN.label (
str, default:'') – Prefix prepended to the failure message.
- Return type: