From 32f08df160cd577e2817a6469734c8b511d2756b Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Thu, 1 Aug 2019 16:23:07 -0400 Subject: [PATCH] Add missing from __future__ import division, delete Unicode (#201) Signed-off-by: Edward Z. Yang (cherry picked from commit 25504ad60a10347d9123d7ea237b9d4acd0209ec) --- test/test_jit.py | 1 + torchaudio/functional.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_jit.py b/test/test_jit.py index ecccba246c..b1f13292e6 100644 --- a/test/test_jit.py +++ b/test/test_jit.py @@ -1,3 +1,4 @@ +from __future__ import division import torch import torchaudio.functional as F import torchaudio.transforms as transforms diff --git a/torchaudio/functional.py b/torchaudio/functional.py index 9155c827d7..bc24c805e9 100644 --- a/torchaudio/functional.py +++ b/torchaudio/functional.py @@ -1,3 +1,4 @@ +from __future__ import division import math import torch @@ -61,8 +62,8 @@ def istft(stft_matrix, # type: Tensor could be useful. If ``length`` is ``None`` then padding will be aggressively removed (some loss of signal). - [1] D. W. Griffin and J. S. Lim, “Signal estimation from modified short-time Fourier transform,” - IEEE Trans. ASSP, vol.32, no.2, pp.236–243, Apr. 1984. + [1] D. W. Griffin and J. S. Lim, "Signal estimation from modified short-time Fourier transform," + IEEE Trans. ASSP, vol.32, no.2, pp.236-243, Apr. 1984. Args: stft_matrix (torch.Tensor): Output of stft where each row of a channel is a frequency and each