From d5a759fb77019bbf7347c8530eaa4f86ba9ddc2f Mon Sep 17 00:00:00 2001 From: davidpagnon Date: Sat, 8 Jun 2024 16:15:04 +0200 Subject: [PATCH] solve "all nan slice encountered" in euclidian distance --- Pose2Sim/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pose2Sim/common.py b/Pose2Sim/common.py index 869e243..2f42b9a 100644 --- a/Pose2Sim/common.py +++ b/Pose2Sim/common.py @@ -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