From c86ee082a26dbb8ff7a995c49b45eb3fbdf7e1a6 Mon Sep 17 00:00:00 2001 From: Peter Bell Date: Thu, 8 Oct 2020 17:53:59 -0700 Subject: [PATCH] torch.fft: Add helper functions section to docs (#46032) Summary: Fixes https://github.com/pytorch/pytorch/pull/44877#issuecomment-705411068 Pull Request resolved: https://github.com/pytorch/pytorch/pull/46032 Reviewed By: ngimel Differential Revision: D24191580 Pulled By: mruberry fbshipit-source-id: 58a32de886b40f85653ddc3b65bf8d551395f023 --- docs/source/fft.rst | 12 ++++++++++-- torch/fft/__init__.py | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/source/fft.rst b/docs/source/fft.rst index ab50bd271d32..ef728ea6579e 100644 --- a/docs/source/fft.rst +++ b/docs/source/fft.rst @@ -16,8 +16,8 @@ conflicts with the :func:`torch.fft` function. .. currentmodule:: torch.fft -Functions ---------- +Fast Fourier Transforms +----------------------- .. autofunction:: fft .. autofunction:: ifft @@ -29,3 +29,11 @@ Functions .. autofunction:: irfftn .. autofunction:: hfft .. autofunction:: ihfft + +Helper Functions +---------------- + +.. autofunction:: fftfreq +.. autofunction:: rfftfreq +.. autofunction:: fftshift +.. autofunction:: ifftshift diff --git a/torch/fft/__init__.py b/torch/fft/__init__.py index b3ffdb24b4a0..5ae82660eeaa 100644 --- a/torch/fft/__init__.py +++ b/torch/fft/__init__.py @@ -688,6 +688,7 @@ beginning of the tensor. This also works for multi-dimensional transforms: + >>> x = torch.fft.fftfreq(5, d=1/5) + 0.1 * torch.fft.fftfreq(5, d=1/5).unsqueeze(1) >>> x tensor([[ 0.0000, 1.0000, 2.0000, -2.0000, -1.0000],