In the following code, I am extracting labels from the data and checking whether labels are numerical or not. But the code is throwing an error: "TypeError: not all arguments converted during string formatting".
It seems that it did not like logging.info() code; what is wrong with the logging.info() code?
y = data[data.columns[self.label_pos]].to_numpy()
labels = np.unique(y)
if not isinstance(labels, int): # if one label is char, array will convert all labels to char
logging.info("Label is not numeric", labels)
for i in range(len(labels)):
y[y == labels[i]] = i