I have not worked with loops before but I would like to loop the code below for 5 times and store the values of each iteration seperatly. How can I do that?
realisations = np.concatenate([np.random.choice(outcome_pairs[i].ravel(), size = 1 , p=nominalized_prob_pairs[i].ravel()) for i in range(len(outcome_pairs))])
Aucun commentaire:
Enregistrer un commentaire