Skip to content

Commit

Permalink
minor cleanups with scope field popping
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Aug 31, 2016
1 parent 2070d93 commit 54a1755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pumpp/feature/cqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CQTMag(CQT):
def __init__(self, *args, **kwargs):

super(CQTMag, self).__init__(*args, **kwargs)
self.fields.pop(self.scope('phase'))
self.pop('phase')

def transform_audio(self, y):

Expand All @@ -59,7 +59,7 @@ class CQTPhaseDiff(CQT):
def __init__(self, *args, **kwargs):

super(CQTPhaseDiff, self).__init__(*args, **kwargs)
phase_field = self.fields.pop(self.scope('phase'))
phase_field = self.pop('phase')
self.register('dphase', phase_field.shape, phase_field.dtype)

def transform_audio(self, y):
Expand Down
4 changes: 2 additions & 2 deletions pumpp/task/chord.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def __init__(self, name='chord', sr=22050, hop_length=512):
sr=sr,
hop_length=hop_length)
# Remove the extraneous fields
self.fields.pop(self.scope('root'), None)
self.fields.pop(self.scope('bass'), None)
self.pop('root')
self.pop('bass')

def transform_annotation(self, ann, duration):

Expand Down

0 comments on commit 54a1755

Please sign in to comment.