solve "all nan slice encountered" in euclidian distance

This commit is contained in:
davidpagnon 2024-06-08 16:15:04 +02:00
parent 62e5e73262
commit d5a759fb77

View File

@ -230,7 +230,7 @@ def euclidean_distance(q1, q2):
q2 = np.array(q2)
dist = q2 - q1
euc_dist = np.sqrt(np.sum( [d**2 for d in dist]))
euc_dist = np.sqrt(np.nansum( [d**2 for d in dist]))
return euc_dist