d02dff76c1e8fcfcff277a4ea0a65f9c8259605e,torchaudio/__init__.py,,load,#Any#Any#,9

Before Change


        func = th_sox.libthsox_Float_read_audio_file
    elif isinstance(out, torch.DoubleTensor):
        func = th_sox.libthsox_Double_read_audio_file
    elif isinstance(out, torch.ByteTensor):
        func = th_sox.libthsox_Byte_read_audio_file
    elif isinstance(out, torch.CharTensor):
        func = th_sox.libthsox_Char_read_audio_file
    elif isinstance(out, torch.ShortTensor):
        func = th_sox.libthsox_Short_read_audio_file
    elif isinstance(out, torch.IntTensor):
        func = th_sox.libthsox_Int_read_audio_file
    elif isinstance(out, torch.LongTensor):
        func = th_sox.libthsox_Long_read_audio_file
        
    sample_rate_p = ffi.new("int*")    
    func(bytes(filename), out, sample_rate_p)
    sample_rate = sample_rate_p[0]

After Change


        check_input(out)
    else:
        out = torch.FloatTensor()
    typename = type(out).__name__.replace("Tensor", "")
    func = getattr(th_sox, "libthsox_{}_read_audio_file".format(typename))
    sample_rate_p = ffi.new("int*")
    func(bytes(filename), out, sample_rate_p)
    sample_rate = sample_rate_p[0]
    return out, sample_rate
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: pytorch/audio
Commit Name: d02dff76c1e8fcfcff277a4ea0a65f9c8259605e
Time: 2017-05-27
Author: seannaren@hotmail.com
File Name: torchaudio/__init__.py
Class Name:
Method Name: load


Project Name: calico/basenji
Commit Name: 09b8381f7dd52c67fdd629825ff319271167d8c5
Time: 2019-07-11
Author: drk@calicolabs.com
File Name: basenji/seqnn.py
Class Name: SeqNN
Method Name: build_model


Project Name: pytorch/audio
Commit Name: d02dff76c1e8fcfcff277a4ea0a65f9c8259605e
Time: 2017-05-27
Author: seannaren@hotmail.com
File Name: torchaudio/__init__.py
Class Name:
Method Name: save


Project Name: calico/basenji
Commit Name: 71106ac70146d89b3e3e0774a5c27a98212e1405
Time: 2019-07-11
Author: geoff.fudenberg@gmail.com
File Name: basenji/seqnn.py
Class Name: SeqNN
Method Name: build_model