I have three lists, each containing lets say 2 elements. How can I obtain a (8x3) array which contains all the possible combinations (with replacement) of the elements in the three lists?
Example:
vec1 = [4, 6]
vec2 = [2, 4]
vec3 = [1, 5]
output = [[4, 2, 1], [4, 2, 5], [4, 4, 1], [4, 4, 5], [6, 2, 1], [6, 4, 5], [6, 2, 5], [6, 4, 1]]
This is my code (simplified):
import scipy.stats as st
percentiles = [0.01, 0.99]
draws1 = st.norm.ppf(percentiles, 0, 1)
draws2 = st.norm.ppf(percentiles, 0, 1)
draws3 = st.norm.ppf(percentiles, 0, 1)