with open('gaze.csv', 'r') as gaze: gaze_1_x, gaze_0_x, gaze_1_y, gaze_0_y, gaze_1_z, gaze_0_z = tuple(cols) for i in range(len(gaze_0_x)): x = float(gaze_1_x[i]) - float(gaze_0_x[i]) y = float(gaze_1_y[i]) - float(gaze_0_y[i]) z = float(gaze_1_z[i]) - float(gaze_0_z[i]) for line in gaze.readlines(): g = lambda x, y, z: ((x**2 + y**2 + z**2)**0.5, [x, y, z]) print(g) In summary: function lambda at 0x0DFA3A08 for each line of the file. What am I doing wrong?
ZY you need to substitute the values from each line into the function and get the original answer to each line. When playing with code, the maximum was an insane addition-multiplication of the arguments of all the columns with their subsequent substitution.
((x**2 + y**2 + z**2)**0.5? Then simply:g = (x**2 + y**2 + z**2)**0.5Lambda will return the value if it is called():(lambda x, y, z: (x**2 + y**2 + z**2)**0.5)(x, y, z)- gil9redg = (x**2 + y**2 + z**2)**0.5, [x, y, z]:) - gil9red