AxisError: axis 1 is out of bounds for array of dimension 1
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