Hi,
You should use operations defined in pytensor.tensor to construct matrices of tensors. So the incorrect line is
p = np.array([[c11, c12], [c21, c22]])
Instead you can do
import pytensor.tensor as pt
p = pt.reshape(pt.stack([c11,c12,c21,c22]),(2,2))