Working code fails with PyMC 5.16

Hi Ricardo,

I am not sure which one is correct in this case - I imagine that some automatic broadcasting/conversion handled this up to v5.14.0 and I never worried about it since the results were matching the numpy implementation.

I am trying to replicate the following code, with scan “looping” through the trials and computing the choice probabilities at each trial.
But, I am not really sure on how to change the pytensor code to match this.

n_subj = 10
n_trials = 20

beta = np.ones((n_subj))
choice_probs = np.zeros((n_trials, n_subj))
belief = np.random.rand(n_trials, n_subj, 2)

for t in range(n_trials):
    choice_probs = np.exp(beta[:] * belief[t,:,0]) / (np.exp(beta[:] * belief[t,:,0]) + np.exp(beta[:] * belief[t,:,1]))