My code below is giving me the following error "IndexError: index 2048 is out of bounds for axis 1 with size 2". I am quite new so I do not have any idea about how to solve this. Any kind of help would be appreciated.

X=[]

X1 = np.load('class_1data_model1.npy')

X2 = np.load('class_2data_model1.npy')

X_data = np.append(X1,X2,axis=0)

#X_data = np.append(X1,X2)

Y_data = X_data[:,2048]

X_data = X_data[:,0:2048]

x_tr,x_ts,y_tr,y_ts = train_test_split(X_data, Y_data, test_size=0.2,random_state=10)

More Sana Ejaz's questions See All
Similar questions and discussions