I would print the shape of y in the warning.