Time dependant ODE parameters / functions

I understood your question now!!

Yes, that is the trouble with working with TensorVariable.
Someone from PyMC developers’ team can clarify this point, but I think TensorVariable only support arithmetic operations like addition, subtraction etc…

For my case, I wanted to use np.gradient to get new_cases in my model. But TensorVariable also does not support np.gradient. So instead of
new_cases = np.gradient(modelled_cum_dths)

I did this instead,

new_cases = modelled_cum_dths[1:] - modelled_cum_dths[:-1]

So my way was to convert unsupported functions to arithmetic operations. But if anyone else knows a better way, let me know.