I have a 1D array with 100 elements. I wish to randomly extract a set of N consecutive numbers from the array. Is there a way to do that using numpy? I know that the function np.random.choice() generates random numbers but it does not extract consecutive numbers. Any help will be much appreciated. Thanks!
Aucun commentaire:
Enregistrer un commentaire