y_class = np.argmax(y_pred, axis = 1)
here axis=1 represents check max value index column wise
you are facing the error because you are passing vector (size,)
y_class = np.argmax(y_pred, axis = 0)
use above code to remove the error
If your classes have a natural order, like exam grades, you can encode then as consecutive integers. That way you can plot a confusion matrix and also give the mean absolute error in your predictions when they are treated as integer values.
Watch out for unequal distances between adjacent classes, which might make a metric like MAE misleading depending on ...
The classes that define the columns/rows can be arbitrarily rearranged. Therefore, the "distance" of a misclassification to the diagonal has no meaning. So no, there is no such metric.
I like @Dave's comment: "Is it worse to call a dog a cat than it is to call a dog a horse?"
Maybe you'd ask yourself, "some classes feel closer ...