PyMC3 : Using a parameter as a limit of integral

Oh I see, the end point of the Integral is an array, that’s why it’s not working.
You will need to rewrite the IntegrateOps into something that accept vector input for start point and end point, alternatively, try wrapping it in a for-loop:

x = np.arange(100)
y_obs = np.random.randn(100)

start = theano.shared(0.)
with pm.Model() as basic_model:
    a = pm.Uniform('a', 0.01, 0.1)
    b = pm.Uniform('b', 0.001, 0.01)
    xp = pm.Normal('xp', mu=x, sd=a + b * x, shape=100)

    t = tt.dscalar('t')
    t.tag.test_value = np.zeros(())
    func = (1 + 0.2 * ((1 + t)**3. - 1))**(-0.5)
    integrate = Integrate(func, t)
    
    mu = tt.stack([integrate(start, xp[i]) for i in range(100)])

    y = pm.Normal('y', mu=mu, sd=0.5, observed=y_obs)