From aad399745c3909bf5e3283693022d50cf2c8ebfe Mon Sep 17 00:00:00 2001 From: sagarsj42 Date: Tue, 26 Apr 2022 20:26:07 +0530 Subject: [PATCH] Change in metrics code to convert list of x to np array --- metrics.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metrics.py b/metrics.py index d53c716..82f0c9e 100644 --- a/metrics.py +++ b/metrics.py @@ -6,8 +6,9 @@ import numpy as np def compute_metrics(x): - sx = np.sort(-x, axis=1) - d = np.diag(-x) + x = -np.concatenate(x, axis=0) + sx = np.sort(x, axis=1) + d = np.diag(x) d = d[:, np.newaxis] ind = sx - d ind = np.where(ind == 0)