diff --git a/docs/source/functional.rst b/docs/source/functional.rst index 284153c7fd..16899815ef 100644 --- a/docs/source/functional.rst +++ b/docs/source/functional.rst @@ -76,10 +76,6 @@ resample Utilities for pseudo complex tensor. This is not for the native complex dtype, such as `cfloat64`, but for tensors with real-value type and have extra dimension at the end for real and imaginary parts. -angle ------ - -.. autofunction:: angle complex_norm ------------ diff --git a/torchaudio/functional/__init__.py b/torchaudio/functional/__init__.py index 494f1bdc23..ad90516d42 100644 --- a/torchaudio/functional/__init__.py +++ b/torchaudio/functional/__init__.py @@ -1,6 +1,5 @@ from .functional import ( amplitude_to_DB, - angle, complex_norm, compute_deltas, compute_kaldi_pitch, @@ -53,7 +52,6 @@ __all__ = [ 'amplitude_to_DB', - 'angle', 'complex_norm', 'compute_deltas', 'compute_kaldi_pitch', diff --git a/torchaudio/functional/functional.py b/torchaudio/functional/functional.py index 1340216f40..c55e61603e 100644 --- a/torchaudio/functional/functional.py +++ b/torchaudio/functional/functional.py @@ -29,7 +29,6 @@ "mu_law_encoding", "mu_law_decoding", "complex_norm", - "angle", "phase_vocoder", 'mask_along_axis', 'mask_along_axis_iid', @@ -749,27 +748,6 @@ def complex_norm( return complex_tensor.pow(2.).sum(-1).pow(0.5 * power) -@_mod_utils.deprecated( - "Please convert the input Tensor to complex type with `torch.view_as_complex` then " - "use `torch.angle`. " - "Please refer to https://github.com/pytorch/audio/issues/1337 " - "for more details about torchaudio's plan to migrate to native complex type.", - version="0.11", -) -def angle( - complex_tensor: Tensor -) -> Tensor: - r"""Compute the angle of complex tensor input. - - Args: - complex_tensor (Tensor): Tensor shape of `(..., complex=2)` - - Return: - Tensor: Angle of a complex tensor. Shape of `(..., )` - """ - return torch.atan2(complex_tensor[..., 1], complex_tensor[..., 0]) - - def phase_vocoder( complex_specgrams: Tensor, rate: float,