python-numpy: apply a function to each row of a ndarray,np.random.seed(1)