IndexError: índice no válido de la variable escalar.
# You might be trying to index a scalar (non-iterable) value:
[y[1] for y in y_test]
# ^ this is the problem
# When you call [y for y in test] you are iterating over the values already, so you get a single value in y.
# Your code is the same as trying to do the following:
y_test = [1, 2, 3]
y = y_test[0] # y = 1
print(y[0]) # this line will fail
# instead you could use a for loop:
for y in y_test:
results.append(..., y)
codeconnoisseur