I probably would have done ``np.sum(pred == true)``, not sure if any one is better...