def local_weight_regression(
    training_data_x: np.array, training_data_y: np.array, bandwidth: float
) -> np.array:
    m, _ = np.shape(training_data_x)
    ypred = np.zeros(m)

    for i, item in enumerate(training_data_x):
        ypred[i] = item @ local_weight(
            item, training_data_x, training_data_y, bandwidth
        )

    return ypred