astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Astropy Core Package Utilities (`astropy.utils`) »
- diff_values

# diff_values

astropy.utils.diff.diff_values(a, b, rtol=0.0, atol=0.0)

  Diff two scalar values. If both values are floats, they are compared to within the given absolute and relative tolerance.

  Parameters:
    a, b `python:int`, `python:float`, `python:str`

      Scalar values to compare.

    rtol, atol `python:float`

      Relative and absolute tolerances as accepted by `numpy.allclose()`.

  Returns:
    is_different bool

      `True` if they are different, else `False`.