Table of Contents

Class PocketFFTDriver

Namespace
NumSharp
Assembly
NumSharp.dll
public static class PocketFFTDriver
Inheritance
PocketFFTDriver
Inherited Members

Methods

Execute(NDArray, int, int, bool, bool, double, NDArray, bool, bool)

Run a 1-D pocketfft transform along axis of a.

public static NDArray Execute(NDArray a, int n, int axis, bool isReal, bool isForward, double fct, NDArray @out = null, bool floatPrec = false, bool effNormUnity = true)

Parameters

a NDArray

Input array. Coerced to complex128 (c2c / irfft) or double (rfft).

n int

The transform length: c2c/irfft output length, rfft input (npts).

axis int

Transform axis (negative allowed).

isReal bool

true = real transform (rfft when forward, irfft when inverse).

isForward bool

true = forward (fft/rfft), false = inverse (ifft/irfft).

fct double

Normalisation factor applied inside the transform.

out NDArray

Optional preallocated output (shape = a.shape with axis->n_out).

floatPrec bool

The value being transformed is float32/float16 precision (numpy returns complex64/float32/ float16). NumSharp keeps the result dtype complex128/float64 (no complex64 — issue #569) but reproduces numpy's VALUES. numpy computes almost every one of these in DOUBLE and rounds the output to the numpy result precision — so here the double engine runs and the result is rounded element-wise (complex outputs → float32 components; irfft/hfft real output → float32, or float16 when the input is a float16 real array). The ONE exception is rfft of a float32 real input, which numpy runs through its single-precision ff->F loop; that case (and only that) takes the single-precision RfftpF engine and needs no rounding (it already produces float values). The fct arrives already computed in the right real_dtype (see RawFft).

effNormUnity bool

Returns

NDArray