I am running a classifier and for that, I used np.array() to generate labels for the data. I collected all the labels in a list and then used np.array() to convert it to a numpy array.
a= [list of labels]
But the above logic created Y as a matrix and because of that train_test_split function of sklearn.model_selection module is giving an error. train_test_split function needs Y as an array, not as a matrix. Is there any way to fix this issue? I tried a few things, but train_test_split function is still giving the error.