I was overwriting x,y variables with the list comprehension, causing the lists in x,y to be replaced with a single value.