From effd977e096d14d8b14ab899d855c7cc1a760a2f Mon Sep 17 00:00:00 2001 From: Manos Katsomallos Date: Fri, 18 Feb 2022 19:16:33 +0100 Subject: [PATCH] lmdk_sel_cmp: Dealt with zero-size array error --- code/expt/lmdk_sel_cmp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/expt/lmdk_sel_cmp.py b/code/expt/lmdk_sel_cmp.py index ea109f1..e2346d6 100644 --- a/code/expt/lmdk_sel_cmp.py +++ b/code/expt/lmdk_sel_cmp.py @@ -57,6 +57,9 @@ def main(args): print('(%d/%d) %s... ' %(d_i + 1, len(dist_type), title), end='', flush=True) mae = np.zeros(len(lmdk_n)) for n_i, n in enumerate(lmdk_n): + # Skip the last one + if n_i == len(lmdk_n) - 1: + break for r in range(args.iter): lmdks = lmdk_lib.get_lmdks(seq, n, d) hist, h = lmdk_lib.get_hist(seq, lmdks)