I am working on an API-accessible sampling procedure, where a user can input priors and observed data and obtain posterior distributions.
Lets say we have 100 different observed arrays and priors, all to be sampled at the same time. Is there a difference between using
prior_array = pm.Normal("n",mu=priors, shape=len(priors)
pm.Normal("likelihood",mu=prior_array,observed=observed_arrays) #len(observed_arrays)=len(prior_arrays)=100)
and doing a for loop where we specify one prior and one lilkehood function for each array:
for i in range(100):
prior = pm.Normal("n"+str(i),mu=prios[i])
pm.Normal("likelihood"+str(i),mu=prior,observed=observed_arrays[i])