From b2eaafa5c0c22b618fde01230d074db54b99cf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ck?= Date: Tue, 19 Sep 2017 14:29:57 +0200 Subject: [PATCH] cast state intervals to int --- madmom/features/tempo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/madmom/features/tempo.py b/madmom/features/tempo.py index da88433d5..3560a2bfb 100755 --- a/madmom/features/tempo.py +++ b/madmom/features/tempo.py @@ -550,8 +550,8 @@ def process_offline(self, activations, **kwargs): path, _ = self.dbn.hmm.viterbi(activations.astype(np.float32)) intervals = self.dbn.st.state_intervals[path] # get the counts of the bins - bins = np.bincount(intervals, - minlength=self.dbn.st.intervals.max() + 1) + max_intervals = self.dbn.st.intervals.max().astype(np.int) + bins = np.bincount(intervals, minlength=max_intervals + 1) # truncate everything below the minimum interval of the state space bins = bins[self.dbn.st.intervals.min():] # build a histogram together with the intervals and return it