def portfolio_tracking_error(weights, ref_r, bb_r):
    '\n    returns the tracking error between the reference returns\n    and a portfolio of building block returns held with given weights\n    '
    return tracking_error(ref_r, (weights * bb_r).sum(axis=1))
returns the tracking error between the reference returns
and a portfolio of building block returns held with given weights
def portfolio_tracking_error(weights, ref_r, bb_r):
    '\n    returns the tracking error between the reference returns\n    and a portfolio of building block returns held with given weights\n    '
    return tracking_error(ref_r, (weights * bb_r).sum(axis=1))