def rolling_average(values, window):
    if window <= 0:
        raise ValueError("window must be > 0")
    if window > len(values):
        return []
    result = []
    for i in range(len(values) - window + 1):
        result.append(sum(values[i:i + window]) / window)
    return result
