Matrix-based predictions and complex variables

Also, your code works fine if I wrap the entire thing in a single model context. What version of PyMC and PyTensor are you using? If you are on windows, have you included a __name__ == "__main__"?