Skip to content

Option for Manual/Arbitrary Forward Scale #371

Description

@cdfredrick

I understand the desire to make everything like numpy, but the "norm" parameter is both restrictive (there are more possible scale factors than 1, 1/n, and sqrt(n)) and adds a bunch of overhead for small arrays (<10,000 points in my tests).

Image

Run time is the left axis and array size is the bottom axis. The blue line is numpy.fft.rfft(x) (v2.3.5), and the others are various calls to mkl_fft functions (v2.2.1). The orange is with mkl_fft.rfft(x) and the green is with mkl_fft.rfft(x, norm="forward"). The red is calling the underlying function mkl_fft._pydfti._r2c_fft1d_impl(x, fsc=1/n). Purple was a test of using the "out" keyword.

Notice how the green line is far above the others at small array sizes. I already know what my scale factors are. Like in previous versions (<2.1.1), I would like to be able to directly enter those into the fft functions and have them run fast. That is still possible by calling the implementation, but it would be nice to have a stable/exposed interface to do so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions