d02dff76c1e8fcfcff277a4ea0a65f9c8259605e,torchaudio/__init__.py,,save,#Any#Any#Any#,37
Before Change
assert not src.is_cuda
filename, extension = os.path.splitext(filepath)
assert type(sample_rate) == int
if isinstance(src, torch.FloatTensor):
func = th_sox.libthsox_Float_write_audio_file
elif isinstance(src, torch.DoubleTensor):
After Change
def save(filepath, src, sample_rate):
filename, extension = os.path.splitext(filepath)
if type(sample_rate) != int:
raise TypeError("Sample rate should be a integer")
check_input(src)
typename = type(src).__name__.replace("Tensor", "")
func = getattr(th_sox, "libthsox_{}_write_audio_file".format(typename))
func(bytes(filepath), src, extension[1:], sample_rate)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
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: save
Project Name: lanpa/tensorboardX
Commit Name: 2142d507e6985647c4b6bdfc791388bb9932e60c
Time: 2018-10-13
Author: huang.dexter@gmail.com
File Name: tensorboardX/pytorch_graph.py
Class Name:
Method Name: parse
Project Name: ilastik/ilastik
Commit Name: 011a9a40b5511030bfaf02b6d107b354af8ae534
Time: 2013-04-24
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/ioOperators/opStreamingHdf5Reader.py
Class Name: OpStreamingHdf5Reader
Method Name: setupOutputs
Project Name: ilastik/ilastik
Commit Name: 011a9a40b5511030bfaf02b6d107b354af8ae534
Time: 2013-04-24
Author: bergs@janelia.hhmi.org
File Name: lazyflow/operators/ioOperators/opNpyFileReader.py
Class Name: OpNpyFileReader
Method Name: setupOutputs
Project Name: bokeh/bokeh
Commit Name: 5476a0daf81b314242e271f90dc0b853a5ffc188
Time: 2019-01-09
Author: jlrstevens@gmail.com
File Name: bokeh/application/handlers/tests/test_notebook.py
Class Name: Test_NotebookHandler
Method Name: test_runner_uses_source_from_filename