I want to make a walk to calculate all the possibilities of a given formula. I have to write nested walk but I can not make it correct. I am not good on algorithms: (3) <3> <3> <3> <3> for the calculation of all the probabilities (% 0-% 100), 3 static {z1, z2, z3} values, I prepared:
for z1 in A = frange (0,1.0,0.01): one in z3 for z: in z3: calculation (z1, z2, z3) and works properly as I expect.
If z is a list containing n values (n can be 2-30 in my case), Which algorithm gives you suggestions that I Can I handle it? How do I create nested arrays?
The easiest way to do itertools Product () : a = frange (0,1.0,0.01) in itertools.product for z (a, repeat = n): calculation (* Z) If N would actually be 30 , this would be 100 ** 30 = 10 ** 60 Values will be repeated. Be ready to wait.
Comments
Post a Comment