Unverified Commit 1d3dcdbd authored by S Harish's avatar S Harish Committed by GitHub
Browse files

Remove deprecated F.angle (#1935)

parent 3a599315
...@@ -76,10 +76,6 @@ resample ...@@ -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. 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 complex_norm
------------ ------------
......
from .functional import ( from .functional import (
amplitude_to_DB, amplitude_to_DB,
angle,
complex_norm, complex_norm,
compute_deltas, compute_deltas,
compute_kaldi_pitch, compute_kaldi_pitch,
...@@ -53,7 +52,6 @@ from .filtering import ( ...@@ -53,7 +52,6 @@ from .filtering import (
__all__ = [ __all__ = [
'amplitude_to_DB', 'amplitude_to_DB',
'angle',
'complex_norm', 'complex_norm',
'compute_deltas', 'compute_deltas',
'compute_kaldi_pitch', 'compute_kaldi_pitch',
......
...@@ -29,7 +29,6 @@ __all__ = [ ...@@ -29,7 +29,6 @@ __all__ = [
"mu_law_encoding", "mu_law_encoding",
"mu_law_decoding", "mu_law_decoding",
"complex_norm", "complex_norm",
"angle",
"phase_vocoder", "phase_vocoder",
'mask_along_axis', 'mask_along_axis',
'mask_along_axis_iid', 'mask_along_axis_iid',
...@@ -749,27 +748,6 @@ def complex_norm( ...@@ -749,27 +748,6 @@ def complex_norm(
return complex_tensor.pow(2.).sum(-1).pow(0.5 * power) 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( def phase_vocoder(
complex_specgrams: Tensor, complex_specgrams: Tensor,
rate: float, rate: float,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment