compareScalars¶
- lsst.pex.config.compareScalars(name, v1, v2, output, rtol=1e-08, atol=1e-08, dtype=None)¶
- Compare two scalar values for equality. - This function is a helper for - lsst.pex.config.Config.compare.- Parameters:
- namestr
- Name to use when reporting differences, typically created by - getComparisonName. This will always appear as the beginning of any messages reported via- output.
- v1object
- Left-hand side value to compare. 
- v2object
- Right-hand side value to compare. 
- outputcallable or None
- A callable that takes a string, used (possibly repeatedly) to report inequalities (for example, - print). Set to- Noneto disable output.
- rtolfloat, optional
- Relative tolerance for floating point comparisons. 
- atolfloat, optional
- Absolute tolerance for floating point comparisons. 
- dtypeclass, optional
- Data type of values for comparison. May be - Noneif values are not floating-point.
 
- name
- Returns:
 - See also - Notes - Floating point comparisons are performed by - numpy.allclose.