9d9ef625dccb7ba0ed3295f18d90de9d6dd59469,nussl/audio_signal.py,AudioSignal,__sub__,#AudioSignal#Any#,860
Before Change
return AudioSignal(audio_data_array=combined)
def __sub__(self, other):
self._verify_audio(other, "subtract")
if self.signal_length > other.signal_length:
combined = np.copy(self.audio_data)
combined[:, :other.signal_length] -= other.audio_data
else:
combined = np.copy(other.audio_data)
combined[:, :self.signal_length] -= self.audio_data
return AudioSignal(audio_data_array=combined)
def _verify_audio(self, other, op):
if self.num_channels != other.num_channels:
raise Exception("Cannot " + op + " with two signals that have a different number of channels!")
After Change
return self.add(other)
def __sub__(self, other):
return self.subtract(other)
def _verify_audio(self, other):
if self.num_channels != other.num_channels:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 26
Instances
Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __sub__
Project Name: interactiveaudiolab/nussl
Commit Name: e01dc00651cb36ee62d3cb9c97d82a4892e1f001
Time: 2017-02-09
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __sub__
Project Name: interactiveaudiolab/nussl
Commit Name: e01dc00651cb36ee62d3cb9c97d82a4892e1f001
Time: 2017-02-09
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __add__
Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __add__
Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __sub__