def optimal_weights(n_points, er, cov):
    '\n    Returns a list of weights that represent a grid of n_points on the efficient frontier\n    '
    target_rs = np.linspace(er.min(), er.max(), n_points)
    weights = [minimize_vol(target_return, er, cov) for target_return in target_rs]
    return weights
Returns a list of weights that represent a grid of n_points on the efficient frontier
def optimal_weights(n_points, er, cov):
    '\n    \n    '
    target_rs = np.linspace(er.min(), er.max(), n_points)
    weights = [minimize_vol(target_return, er, cov) for target_return in target_rs]
    return weights