def linear_fit(ab, x):
    """Linear function of x
    Args:
        ab: [a, b]
            Constant and slope
        x: array or float
            Input data

    Returns:
        a + b * x
    """
    return ab[0] + ab[1] * x