Thanks for taking the time to reply to my question.
I would like my code to work with any size of U, including when U is empty.
This is working fine for me in pystan (and I think it is also allowed in R-stan, see this thread). I am now trying the same code in cmd-stan 2.19 because I want to try the new offset-multiplier feature, which isn’t yet available in pystan (still at 2.18).
I was wondering how one could pass an empty array. I agree one could use a number of tricks (e.g. having U with rows_U (>0) rows but only reading its first n_inputs rows) but I am sure there must be a cleaner way.