I have cartesian coordinates of two points in a txt file.
-0.329637489 3.481200000 1.740200000
2.389059814 1.000230000 8.653210000
I have read the file
with open('coord.txt', 'r') as f:
lines = f.readlines()
lines_1 = [x.strip() for x in lines]
lines_2 = [x.split() for x in lines_1]
lines_2 = np.array(lines_2).astpye(float)
>> array([[-0.32963749, 3.4812 , 1.7402 ],
[ 2.38905981, 1.00023 , 8.65321 ]])
I can select each entity of the matrix to calculate the distance between the points. But I want to learn what API/library would give the most effective result and how/why.
If there is a computational cost difference, the difference would come from the language they used for the API/library?