def estimate_infectious_rate_constant_vec(event_times,
                                          follower,
                                          t_start,
                                          t_end,
                                          kernel_integral,
                                          count_events=None):
    """
    Returns estimation of infectious rate for given event time and followers on defined interval.
    Optimized using numpy.

    :param event_times: nd-array of event times
    :param follower: nd-array of follower counts
    :param t_start: time interval start
    :param t_end: time interval end
    :param kernel_integral: integral function of kernel function
    :param count_events: count of observed events in interval (used for time window approach)
    :return: estimated values for infectious rate
    """
    kernel_int = follower * kernel_integral(t_start - event_times,
                                            t_end - event_times)
    if count_events is not None:
        return count_events / kernel_int.sum()
    else:
        return event_times.size / kernel_int.sum()