efficient loop over numpy array,np.sum(a)