You can specify the number of random integers in numpy.randint
(third argument). Also, you should be familiar with numpy.array
's index notations. Here, you can access all the elements in one row by :
specifier.
mean = data[np.random.randint(0,len(data),3),:]