What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-05 04:31:07
shuffle x_train and y_train toghether
from sklearn.utils import shuffle import numpy as np X = np.array([[0, 0, 0], [1, 1, 1], [2, 2, 2], [3, 3, 3], [4, 4, 4]]) y = np.array([0, 1, 2, 3, 4]) X, y = shuffle(X, y) print(X) print(y) [[1 1 1] [3 3 3] [0 0 0] [2 2 2] [4 4 4]] [1 3 0 2 4] Add solution -
-
Python 2021-10-24 04:24:08
how to sort a list randomly in python
import random number_list = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70] print("Original list:", number_list) random.shuffle(number_list) print("List after first shuffle:", number_list) random.shuffle(number_list) print("List after ... Add solution
Best helpers
Ranking is empty