I want to take the first 70% of my shuffeled data as training data and the rest as test data, but I receive that strange error.
I have looked at other code examples with that error but don't get it, sorry.
import numpy as np
segment_relative_path = ["a", "b", "c", "d", "e", "f"]
idx = np.random.permutation(len(segment_relative_path))
train_data = segment_relative_path[idx[:int(0.7*len(idx))]]
This gives:
TypeError: only integer scalar arrays can be converted to a scalar index.
What do I have to change to avoid that error?