def _is_integer(f):
    """
    Check if a scalar is an integer.

    :param f: Scalar that we want to check.
    :return: Whether or not the scalar is an integer.
    :rtype: bool
    """
    return f == int(f)