Do not use cycle , Calculate the percentage of nutrition in each food
So how does this work ? One (3*4) How to divide the matrix of (1*4) Matrix , Here we use the radio , stay python in , This (1*4) The matrix of will be expanded into (3*4) Matrix
For example, the following calculation
stay python in , Try not to use the following rank 1 Array of , It is not a row vector , Nor is it a column vector
Like this is a vector
It can also be done through reshap perhaps assert To ensure that the input is a vector