Numpy: multiplying by a vector of ones
===

I'm currently working through some concepts in a computer-science textbook.  Linear algebra is heavily used, and the examples they show in the textbook all use Numpy.

One expression in particular has me totally confused, because it seems to be a completely useless expression.  Copied verbatim from the textbook, it says:

`normalisers = sum(exp(outputs),axis=1)*ones((1,shape(outputs)[0]))`

So, I'll remove the `exp` for the sake of simplification (it's not relevant to the issue here), which gives us:

`sum(outputs,axis=1)*ones((1,shape(outputs)[0]))`

where `outputs` is a 2-D Numpy `array` (matrix).

As far as I can tell, this is just summing all the rows in the `outputs` matrix, and then multiplying the resulting vector element-wise by a vector of all ones.  So... what's the point of multiplying by all ones here?  It's not going to change the values at all.

Is this an error in the textbook, or am I just not seeing how multiplying by all ones could possibly have any effect on the values here?  I'm only somewhat familiar with Numpy at this point, so I'm not sure if I'm simply misunderstanding some of the implications of this expression.