Convert x to a TensorVariable first with x = pt.as_tensor(x) and then you can index it with pymc variables.
import pytensor.tensor as pt
You can also use pm.ConstantData to wrap your x as a tensor if you prefer
Convert x to a TensorVariable first with x = pt.as_tensor(x) and then you can index it with pymc variables.
import pytensor.tensor as pt
You can also use pm.ConstantData to wrap your x as a tensor if you prefer