I am using spicy minimize function to get the weights for the portfolio\'s securities but I keep getting an error when I use the dot product to calculate the volatility. Can any