sorry for rather silly question but I can't think how to do it efficiently. Say I have a matrix
a = np.arange(12).reshape(4,3)
[[ 0 1 2]
[ 3 4 5]
[ 6 7 8]
[ 9 10 11]]
How can I select the first element from each column and then multiply the whole row by it? So I want to end up with
[[ 0 1 4]
[ 0 4 10]
[ 0 7 16]
[ 0 10 22]]