Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/source/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
2 changes: 0 additions & 2 deletions torchaudio/functional/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .functional import (
amplitude_to_DB,
angle,
complex_norm,
compute_deltas,
compute_kaldi_pitch,
Expand Down Expand Up @@ -53,7 +52,6 @@

__all__ = [
'amplitude_to_DB',
'angle',
'complex_norm',
'compute_deltas',
'compute_kaldi_pitch',
Expand Down
22 changes: 0 additions & 22 deletions torchaudio/functional/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"mu_law_encoding",
"mu_law_decoding",
"complex_norm",
"angle",
"phase_vocoder",
'mask_along_axis',
'mask_along_axis_iid',
Expand Down Expand Up @@ -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,
Expand Down