I have N arrays like this (4 in example but number can be different)
k1 = [1,0,0,0,1,0,1]
k2 = [0,1,1,0,1,0,1]
k3 = [1,0,0,0,1,0,0]
k4 = [0,0,0,0,1,1,1]
I need to get the following arrays:
k1 = [0.5,0,0,0,0.25,0,0.33]
k2 = [0, 1,1,0,0.25,0,0.33]
k3 = [0.5,0,0,0,0.25,0,0]
k4 = [0, 0,0,0,0.25,1,0.33]
The idea is to divide each element on number of "1" occurrences for the same index in other arrays. So you always get 1 as sum of k1[i]+k2[i]+k3[i]+k4[i]+...kn[i]