Fix a broadcasting error.

I did this inelegantly and rather verbosely to demonstrate the nature of the problem. self.weights expects an (n_weights, 1) array rather than an n_weights array. It throws a broadcasting error otherwise. This fixes that. I don't propose the ultimate fix look like this.