Skip to content

Commit

Permalink
add docstring for functional_impl test
Browse files Browse the repository at this point in the history
  • Loading branch information
nateanl committed Feb 25, 2022
1 parent 6f07572 commit 9deebbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/source/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ mvdr_weights_rtf

.. autofunction:: mvdr_weights_rtf

compute_rtf_evd
rtf_evd
-------

Expand Down
5 changes: 5 additions & 0 deletions test/torchaudio_unittest/functional/functional_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ def _rtf_evd_numpy(self, psd):
return rtf

def test_rtf_evd(self):
"""Verify ``F.rtf_evd`` method by the numpy implementation.
Given the multi-channel complex-valued spectrum, we compute the PSD matrix as the input,
``F.rtf_evd`` outputs the relative transfer function (RTF) (Tensor of dimension `(..., freq, channel)`),
which should be identical to the output of ``rtf_evd_numpy``.
"""
n_fft_bin = 10
channel = 4
specgram = np.random.random((n_fft_bin, channel)) + np.random.random((n_fft_bin, channel)) * 1j
Expand Down

0 comments on commit 9deebbf

Please sign in to comment.