How to properly use split data with PyMC?

beta[0] + x @ beta[1:] should work. What error do you get?

Also note that you should be using x (the pm.MutableData object) everywhere in your model instead of X_train, otherwise PyMC won’t know to update it.