+1 to remove the shape, as shape=(0, 1) create a zero size random variable which is another way to say no variable.
also, when you see error like Wrong number of dimensions: expected 0, got 1 with shape (1,)., it actually means some of the input is (1, ) shape instead of a scalar - I cannot quite reproduce your error but usually you can wrap the random variables in question with tt.squeeze.