Python Scipy FFT原始功能在哪里?

发布于 2025-02-13 22:33:54 字数 774 浏览 0 评论 0原文

我尝试研究Scipy FFT功能,以解释FFT如何向学生使用。

但是,Scipy文件中的FFT函数为空!它在哪里 ?我想念什么?

当您转到Scipy软件包目录时 - > FFT-> _basic.py fft函数是一个:

def _dispatch(func):
    """
    Function annotation that creates a uarray multimethod from the function
    """
    return generate_multimethod(func, _x_replacer, domain="numpy.scipy.fft")


@_dispatch
def fft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
        plan=None):
    """
    Compute the 1-D discrete Fourier Transform.

    This function computes the 1-D *n*-point discrete Fourier
    Transform (DFT) with the efficient Fast Fourier Transform (FFT)
    algorithm [1]_.

    ...
    a big comment
    ...

    """
    return (Dispatchable(x, np.ndarray),)

产生FFT的代码行在哪里?

I try to investigate the Scipy fft function to explain how fft work to students.

BUT, the fft function in scipy file is empty ! where is it ? What am I missing ?

When you go to the scipy package directory -> fft -> _basic.py the fft function is this one :

def _dispatch(func):
    """
    Function annotation that creates a uarray multimethod from the function
    """
    return generate_multimethod(func, _x_replacer, domain="numpy.scipy.fft")


@_dispatch
def fft(x, n=None, axis=-1, norm=None, overwrite_x=False, workers=None, *,
        plan=None):
    """
    Compute the 1-D discrete Fourier Transform.

    This function computes the 1-D *n*-point discrete Fourier
    Transform (DFT) with the efficient Fast Fourier Transform (FFT)
    algorithm [1]_.

    ...
    a big comment
    ...

    """
    return (Dispatchable(x, np.ndarray),)

Where are the lines of code that produce the fft ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文