pyhon - best way to find the 1d center of mass in a binary numpy array,np.flatnonzero(x).mean()