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