ABC function works independently - but fails in ```pm.Simulator```

I’m not sure what you mean, but I ran your code fine after using allscenarios_asnp in the internal function. I also needed to convert it to integers by adding dtype='int' to the np.array. All inputs to the simulator function will come in as numerical values, not as symbolic tensors. You are accessing a global symbolic tensor variable; this is where the problem is coming from. You could also pass allscenarios as an input to to the inner function as a solution.

After that I ran into a problem with Categorical sampling values that breaks indexing, see here for a solution.

1 Like