Skip to content

Commit

Permalink
fix typos (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Böck authored Jul 8, 2016
1 parent a91c250 commit 50d3603
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion madmom/audio/stft.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def add_arguments(parser, window=None, fft_size=None):
Returns
-------
argpase argument group
argparse argument group
STFT argument parser group.
Notes
Expand Down
2 changes: 1 addition & 1 deletion madmom/features/beats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ def process(self, activations):
for left, right in idx.reshape((-1, 2)):
# pick the frame with the highest activations value
# Note: we look for both beats and non-beat activations;
# since np.argmax wokrs on the flattened array, we
# since np.argmax works on the flattened array, we
# need to divide by 2
peak = np.argmax(activations[left:right, 1:3]) // 2 + left
beats = np.hstack((beats, peak))
Expand Down
6 changes: 3 additions & 3 deletions madmom/features/beats_hmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def exponential_transition(from_intervals, to_intervals, transition_lambda,
from_intervals : numpy array
Intervals where the transitions originate from.
to_intervals : : numpy array
Intervals where the transitions destinate to.
Intervals where the transitions terminate.
transition_lambda : float
Lambda for the exponential tempo change distribution (higher values
prefer a constant tempo from one beat/bar to the next one). If None,
Expand Down Expand Up @@ -581,7 +581,7 @@ class GMMPatternTrackingObservationModel(ObservationModel):
pattern_files : list
List with files representing the rhythmic patterns, one entry per
pattern; each pattern being a list with fitted GMMs.
state_space : :class:`MultiPatternStateSpeac` instance
state_space : :class:`MultiPatternStateSpace` instance
Multi pattern state space.
References
Expand Down Expand Up @@ -629,7 +629,7 @@ def log_densities(self, observations):
Parameters
----------
observations : numpy array
Observations (i.e. multiband spectral flux features).
Observations (i.e. multi-band spectral flux features).
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion madmom/features/chords.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def pred_to_cl(pred):
spf = 1. / fps
labels = [(i * spf, pred_to_cl(p)) for i, p in enumerate(targets)]

# join same consequtive predictions
# join same consecutive predictions
prev_label = (None, None)
uniq_labels = []

Expand Down
4 changes: 2 additions & 2 deletions madmom/ml/hmm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class HiddenMarkovModel(object):
cdef unsigned int obs_start, obs_end, frame, block_sz
cdef double prob_sum, norm_factor

# keep track which observations om_densitites currently contains
# keep track which observations om_densities currently contains
# obs_start is the first observation index, obs_end the last one
obs_start = 0
obs_end = 0
Expand All @@ -563,7 +563,7 @@ class HiddenMarkovModel(object):

# iterate over all states
for state in range(num_states):
# sum ober all possible predecessors
# sum over all possible predecessors
for prev_pointer in range(tm_ptrs[state], tm_ptrs[state + 1]):
fwd_cur[state] += fwd_prev[tm_states[prev_pointer]] * \
tm_probabilities[prev_pointer]
Expand Down
2 changes: 1 addition & 1 deletion madmom/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def search_path(path, recursion_depth=0):
# add all files of this directory to the list
for f in files:
file_list.append(os.path.join(root, f))
# remove all subdirs exceeding the wanted recursion depth
# remove all sub directories exceeding the wanted recursion depth
if initial_depth + recursion_depth <= root.count(os.path.sep):
del dirs[:]
# return the sorted file list
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def setUp(self):
self.activations = Activations(
"%s/stereo_sample.notes_brnn.npz" % ACTIVATIONS_PATH)
self.result = np.loadtxt(
"%s/stereo_sample.pianot_ranscriptor.txt" % DETECTIONS_PATH)
"%s/stereo_sample.piano_transcriptor.txt" % DETECTIONS_PATH)

def test_help(self):
self.assertTrue(run_help(self.bin))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
DETECTIONS_PATH + 'sample.super_flux.txt',
DETECTIONS_PATH + 'sample.super_flux_nn.txt',
DETECTIONS_PATH + 'sample.tempo_detector.txt',
DETECTIONS_PATH + 'stereo_sample.pianot_ranscriptor.txt']
DETECTIONS_PATH + 'stereo_sample.piano_transcriptor.txt']

EVENTS = [1, 1.02, 1.5, 2.0, 2.03, 2.05, 2.5, 3]

Expand Down

0 comments on commit 50d3603

Please sign in to comment.