How to input variables into some functions in the model

In general you can use theano.tensor (pymc3) or aesara.tensor (pymc 4) which implements most of numpy and scipy functions, but for the type of objects that are used by PyMC.

pm.math is just a helper to access some of the most common ones.

https://aesara.readthedocs.io/en/latest/library/tensor/basic.html#aesara.tensor.var._tensor_py_operators.diagonal

1 Like