This sentence is hard to parse.  What exactly is this doing?

```
For each label, compute the sum of the feature vectors which belong to that label.
```

(Is that right?).

Presumably if we could do it efficiently, we could write something like this instead (this code is fine for now).

```
for l in labels:
  weights_per_label[l] = sum(X[Y == label])
```