Scan through an array of random variables Gamma distribution

Looks like the problem is test_output_init = pt.scalar(). This is a symbolic tensor that has no source of data, so PyMC cannot know what value it should be when it runs your model. You should replace this with either 1) a random variable, or 2) an actual value wrapped in pt.as_tensor_variable