def shuffle_data(X, y, seed=None):
    if seed:
        np.random.seed(seed)
    n_samples = X.shape[0]
    idx = np.arange(n_samples)
    np.random.shuffle(idx)
    X = X[idx]
    y = y[idx]
    return (X, y)
def shuffle_data(X, y, seed=None):
    if seed:
        np.random.seed(seed)
    n_samples = X.shape[0]
    idx = np.arange(n_samples)
    np.random.shuffle(idx)
    X = X[idx]
    y = y[idx]
    return (X, y)