face_data =[]
labels = []
class_id = 0
names = {}
for fx in os.listdir(dataset_path):
if fx.endswith('.npy'):
data_item = np.load(dataset_path+fx)
face_data.append(data_item)
target = class_id*np.ones((data_item.shape[0],))
class_id+=1
labels.append(target)
face_dataset = np.concatenate(face_data,axis=0) #error here
face_labels = np.concatenate(labels,axis=0).reshape((-1,1))
print(face_dataset.shape)
print(face_labels.shape)
trainset = np.concatenate((face_dataset,face_labels),axis=1)
I am getting this error: need at least one array to concatenate.
Is there a difference in working of concatenate function in python versions?
Am I missing some arguments? concatenate function worked fine on the pc in my online lecture.