Just a remark, as I ran into the same problem: hherlyng has pointed out that the shape of values has to be different “now”. See his post:
values