Combine pymc3 with a scikit-learn object

The issue here seems to be that you are passing a tensor or theano/aesara random variable (teta) to sklearn which doesn’t know about such things. You are trying to cast the tensor into an array, but this won’t work because tensors are “empty” until runtime. If you are interested in using GPs “inside” of pymc models, I would suggest checking out the GP submodule of pymc itself and the associated notebooks.