Something like `(predictions[mask])[:, p] += 1` does not work because it creates a copy.