From 028ec44d7fd4fe71c537ff23a22c9ce395e2c298 Mon Sep 17 00:00:00 2001 From: Badr-MOUFAD Date: Sat, 30 Mar 2024 12:24:16 +0100 Subject: [PATCH] fix index group --- celer/group_fast.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/celer/group_fast.pyx b/celer/group_fast.pyx index fdeab28e..cc671eb1 100644 --- a/celer/group_fast.pyx +++ b/celer/group_fast.pyx @@ -89,10 +89,11 @@ cpdef floating dnorm_grp( else: # scaling only with features in C for g_idx in range(ws_size): - if weights[g_idx] == INFINITY: + g = C[g_idx] + + if weights[g] == INFINITY: continue - g = C[g_idx] tmp = 0 for k in range(grp_ptr[g], grp_ptr[g + 1]): j = grp_indices[k]