Statespace model parameters estimation with PyMC3

I’m trying to reproduce an example of statsmodels’ state space model parameters estimation available here ( but using pymc3 rather than older versions, but facing some basic problems as a newbie.
I think the main doubt regards how to use a custom likelihood function that takes tensors on inputs but basically needs to calculate likelihood with loglike() of the models with actual numpy arrays.
Can someone point me in the right direction of what I should be reading or learning to accomplish this ?


the most straightforward way is to figure out the implementation of model.loglike, and try to re-implement it into theano.