Skip to content

Commit

Permalink
cast state intervals to int
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Böck committed Sep 19, 2017
1 parent 515ee79 commit b2eaafa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions madmom/features/tempo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b2eaafa

Please sign in to comment.