efc54499191ead69f875877badd3578c60eba7a6,nussl/audio_signal.py,AudioSignal,__init__,#AudioSignal#,37

Before Change


        self._active_start = None
        self._active_end = None

        if (path_to_input_file is not None) and (audio_data_array is not None):
            raise Exception("Cannot initialize AudioSignal object with a path AND an array!")

        if path_to_input_file is not None:
            self.load_audio_from_file(self.path_to_input_file, signal_starting_position, signal_length)
        elif audio_data_array is not None:
            self.load_audio_from_array(audio_data_array, sample_rate)

After Change


        got_path = path_to_input_file is not None
        got_audio_array = audio_data_array is not None
        got_stft = stft is not None
        init_inputs = np.array([got_path, got_audio_array, got_stft])

        if len(init_inputs[init_inputs == True]) > 1:
            raise ValueError("Can only initialize AudioSignal object with one of [path, audio, stft]!")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: interactiveaudiolab/nussl
Commit Name: efc54499191ead69f875877badd3578c60eba7a6
Time: 2017-02-08
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __init__


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 3397e6bfd55584c62d64911ecdaf588ca3469b79
Time: 2020-04-01
Author: 31518063+kurtisvg@users.noreply.github.com
File Name: noxfile-template.py
Class Name:
Method Name:


Project Name: lyst/rpforest
Commit Name: 7f3ed5dd5aafa7e68ded4dcdb17858cd0550f4ae
Time: 2015-07-16
Author: noocrat@gmail.com
File Name: rpforest/rpforest.py
Class Name: RPForest
Method Name: fit