np.prod cannot handle an iterator.