Calc the sum of each column into a vector.
Calc the sum of each column into a vector. The vector will be resized if it doesn't have the right length.