From 75c4e6e2ed55b03b3ecd16e50d23022d750638c1 Mon Sep 17 00:00:00 2001 From: Manos Date: Wed, 6 Oct 2021 10:18:14 +0200 Subject: [PATCH] lmdk_lib: Histograms must have ints --- code/lib/lmdk_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/lib/lmdk_lib.py b/code/lib/lmdk_lib.py index d040af2..d7ffbbc 100644 --- a/code/lib/lmdk_lib.py +++ b/code/lib/lmdk_lib.py @@ -209,7 +209,7 @@ def get_hist(seq, lmdks): h = math.ceil(max(seq)/math.ceil(max(seq)/math.ceil(h))) # Create an empty histogram with intervals of size h - hist = np.zeros(math.ceil(max(seq)/h)) + hist = np.zeros(math.ceil(max(seq)/h), dtype = int) for lmdk in lmdks: hist[int(lmdk/h) - 1] += 1 @@ -912,7 +912,7 @@ def find_lmdks_seq(seq, lmdks): for i, p in enumerate(seq): if any(np.equal(lmdks, p).all(1)): lmdks_seq.append(i + 1) - return np.numpy(lmdks_seq, dtype = int) + return np.array(lmdks_seq, dtype = int) def find_lmdks_tim(lmdk_data, seq, uid, pct):