def __randomize_arrays(self, array_list):
generator_state = np.random.get_state()
for array in array_list:
np.random.shuffle(array)
np.random.set_state(generator_state)
return array_list
After Change
def __randomize_arrays(self, array_list):
//assumes that every array is of the same dimension
numRows = array_list[0].shape[0]
perm = np.random.permutation(numRows)
for array in array_list:
array = array[perm]
return array_list