lmdk_sel_cmp: Dealt with zero-size array error

This commit is contained in:
Manos Katsomallos 2022-02-18 19:16:33 +01:00
parent ab06753b84
commit effd977e09

View File

@ -57,6 +57,9 @@ def main(args):
print('(%d/%d) %s... ' %(d_i + 1, len(dist_type), title), end='', flush=True) print('(%d/%d) %s... ' %(d_i + 1, len(dist_type), title), end='', flush=True)
mae = np.zeros(len(lmdk_n)) mae = np.zeros(len(lmdk_n))
for n_i, n in enumerate(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): for r in range(args.iter):
lmdks = lmdk_lib.get_lmdks(seq, n, d) lmdks = lmdk_lib.get_lmdks(seq, n, d)
hist, h = lmdk_lib.get_hist(seq, lmdks) hist, h = lmdk_lib.get_hist(seq, lmdks)