def resolve_integer_or_float(*numbers):
    """Cast float values as integers if their fractional parts are close to
    zero.

    Parameters
    ----------
    numbers : sequence
        Number(s) to process.

    Returns
    -------
    A number or list of numbers, appropriately transformed.
    """
    if len(numbers) == 1:
        number = numbers[0]
        return int(number) if number % 1 < 1e-6 else round(number, 4)
    else:
        return [
            int(number) if number % 1 < 1e-6 else round(number, 4)
            for number in numbers
        ]