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
aNDArrayInput array. Coerced to complex128 (c2c / irfft) or double (rfft).
nintThe transform length: c2c/irfft output length, rfft input (npts).
axisintTransform axis (negative allowed).
isRealbooltrue = real transform (rfft when forward, irfft when inverse).
isForwardbooltrue = forward (fft/rfft), false = inverse (ifft/irfft).
fctdoubleNormalisation factor applied inside the transform.
outNDArrayOptional preallocated output (shape = a.shape with axis->n_out).
floatPrecboolThe 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
rfftof a float32 real input, which numpy runs through its single-precisionff->Floop; that case (and only that) takes the single-precision RfftpF engine and needs no rounding (it already produces float values). Thefctarrives already computed in the right real_dtype (seeRawFft).effNormUnitybool