def portfolio_return(weights, returns):
    '\n    Computes the return on a portfolio from constituent returns and weights\n    weights are a numpy array or Nx1 matrix and returns are a numpy array or Nx1 matrix\n    '
    return (weights.T @ returns)
Computes the return on a portfolio from constituent returns and weights
weights are a numpy array or Nx1 matrix and returns are a numpy array or Nx1 matrix
def portfolio_return(weights, returns):
    '\n    Computes the return on a portfolio from constituent returns and weights\n    weights are a numpy array or Nx1 matrix and returns are a numpy array or Nx1 matrix\n    '
    return (weights.T @ returns)