Why does (or seems that) the python float has more precision than numpy.float64. Here I leave an example:
import numpy as np ann = 72.595895691 detections = np.array([0, 71.91000009999999], dtype=np.float64) group_det = [1] dist1 = [ann - detections[det] for det in group_det] dist = np.zeros(len(group_det), dtype=np.float64) for idx, det in enumerate(group_det): dist[idx] = ann - detections[det] print(f'dist1: {dist1}') print(f'dist {dist}') The output of this code is:
dist1: [0.6858955910000049] dist [0.68589559] My questions is why dist1 has more precision?
Note: The code seems like is doing things in a very complicated way, but I had to cut a little portion of my code with the same behaviour.