xgcm / xrft

Fourier transforms on xarray data structures
https://xrft.readthedocs.io/en/latest/
MIT License
153 stars 45 forks source link

Doc examples use `xrft.dft` even though it's deprecated #199

Open tomchor opened 1 year ago

tomchor commented 1 year ago

Hi, everyone, I noticed all 4 doc examples use xrft.dft for the forward fft, but when I try to get info on the function the docstring claims it's deprecated:

In [22]: xrft.dft?
Signature: xrft.dft(da, dim=None, true_phase=False, true_amplitude=False, **kwargs)
Docstring: Deprecated function. See fft doc
File:      ~/miniconda3/envs/py310/lib/python3.10/site-packages/xrft/xrft.py
Type:      function

All the snippets I tried worked the same when swapping xrft.dft for xrft.fft, so I guess that's the new function to use? I figure it'd be best to open an issue first to make sure, before opening a PR to fix this.

I'm using version 1.0.1 btw.

roxyboy commented 1 year ago

Yes, the documentation examples are a bit out of date... xrft.fft is the up-to-date function to use. xrft.dft and xrft.fft have different default input arguments.