pytensor tensors are not numbers, they are symbolic objects used to construct a computational graph. You cannot use them with numpy or scipy, or any other package for that matter. See here for an introduction to what pytensor is and how PyMC uses it.
You have two options:
- Write your interpolation function using pytensor functions. We don’t have a
pt.interp
available, but looking at the numpy source code, we should have all the tools to do it using pytensor functions. - Wrap the numpy/scipy code in an pytensor Op, following e.g. this example.
More discussion on this here.