![]() |
NumCpp
2.16.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Namespaces | |
| namespace | detail |
Functions | |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft (const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft (const NdArray< dtype > &inArray, uint32 inN, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft (const NdArray< std::complex< dtype > > &inArray, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft (const NdArray< std::complex< dtype > > &inArray, uint32 inN, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft2 (const NdArray< dtype > &inArray) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft2 (const NdArray< dtype > &inArray, const Shape &inShape) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft2 (const NdArray< std::complex< dtype > > &inArray) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | fft2 (const NdArray< std::complex< dtype > > &inArray, const Shape &inShape) |
| NdArray< double > | fftfreq (uint32 inN, double inD=1.) |
| template<typename dtype > | |
| NdArray< dtype > | fftshift (const NdArray< dtype > &inX, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft (const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft (const NdArray< dtype > &inArray, uint32 inN, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft (const NdArray< std::complex< dtype > > &inArray, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft (const NdArray< std::complex< dtype > > &inArray, uint32 inN, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft2 (const NdArray< dtype > &inArray) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft2 (const NdArray< dtype > &inArray, const Shape &inShape) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft2 (const NdArray< std::complex< dtype > > &inArray) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | ifft2 (const NdArray< std::complex< dtype > > &inArray, const Shape &inShape) |
| template<typename dtype > | |
| NdArray< dtype > | ifftshift (const NdArray< dtype > &inX, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< double > | irfft (const NdArray< std::complex< dtype > > &inArray, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< double > | irfft (const NdArray< std::complex< dtype > > &inArray, uint32 inN, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< double > | irfft2 (const NdArray< std::complex< dtype > > &inArray) |
| template<typename dtype > | |
| NdArray< double > | irfft2 (const NdArray< std::complex< dtype > > &inArray, const Shape &inShape) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | rfft (const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | rfft (const NdArray< dtype > &inArray, uint32 inN, Axis inAxis=Axis::NONE) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | rfft2 (const NdArray< dtype > &inArray) |
| template<typename dtype > | |
| NdArray< std::complex< double > > | rfft2 (const NdArray< dtype > &inArray, const Shape &inShape) |
| NdArray< double > | rfftfreq (uint32 inN, double inD=1.) |
| NdArray< std::complex< double > > nc::fft::fft | ( | const NdArray< dtype > & | inArray, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft.html#numpy.fft.fft
| inArray | |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::fft | ( | const NdArray< dtype > & | inArray, |
| uint32 | inN, | ||
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft.html#numpy.fft.fft
| inArray | |
| inN | Length of the transformed axis of the output. |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::fft | ( | const NdArray< std::complex< dtype > > & | inArray, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft.html#numpy.fft.fft
| inArray | |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::fft | ( | const NdArray< std::complex< dtype > > & | inArray, |
| uint32 | inN, | ||
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft.html#numpy.fft.fft
| inArray | |
| inN | Length of the transformed axis of the output. |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::fft2 | ( | const NdArray< dtype > & | inArray | ) |
Compute the 2-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft2.html#numpy.fft.fft2
| inArray |
| NdArray< std::complex< double > > nc::fft::fft2 | ( | const NdArray< dtype > & | inArray, |
| const Shape & | inShape | ||
| ) |
Compute the 2-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft2.html#numpy.fft.fft2
| inArray | |
| inShape | Shape (length of each transformed axis) of the output |
| NdArray< std::complex< double > > nc::fft::fft2 | ( | const NdArray< std::complex< dtype > > & | inArray | ) |
Compute the 2-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft2.html#numpy.fft.fft2
| inArray |
| NdArray< std::complex< double > > nc::fft::fft2 | ( | const NdArray< std::complex< dtype > > & | inArray, |
| const Shape & | inShape | ||
| ) |
Compute the 2-dimensional discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.fft2.html#numpy.fft.fft2
| inArray | |
| inShape | Shape (length of each transformed axis) of the output |
Return the Discrete Fourier Transform sample frequencies. The returned float array f contains the frequency bin centers in cycles per unit of the sample spacing (with zero at the start). For instance, if the sample spacing is in seconds, then the frequency unit is cycles/second.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.fftfreq.html#
| inN | Window Length |
| inD | (Optional) Sample spacing (inverse of the sampling rate). Must be positive non-zero. Defaults to 1. |
| NdArray< dtype > nc::fft::fftshift | ( | const NdArray< dtype > & | inX, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Shift the zero-frequency component to the center of the spectrum. This function swaps half-spaces for all axes listed (defaults to all). Note that y[0] is the Nyquist component only if len(x) is even.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.fftshift.html
| inX | input array |
| inAxis | (Optional) Axes over which to shift. Default is None, which shifts all axes. |
| NdArray< std::complex< double > > nc::fft::ifft | ( | const NdArray< dtype > & | inArray, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft.html#numpy.fft.ifft
| inArray | |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::ifft | ( | const NdArray< dtype > & | inArray, |
| uint32 | inN, | ||
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft.html#numpy.fft.ifft
| inArray | |
| inN | Length of the transformed axis of the output. |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::ifft | ( | const NdArray< std::complex< dtype > > & | inArray, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft.html#numpy.fft.ifft
| inArray | |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::ifft | ( | const NdArray< std::complex< dtype > > & | inArray, |
| uint32 | inN, | ||
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft.html#numpy.fft.ifft
| inArray | |
| inN | Length of the transformed axis of the output. |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::ifft2 | ( | const NdArray< dtype > & | inArray | ) |
Compute the 2-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft2.html#numpy.fft.ifft2
| inArray |
| NdArray< std::complex< double > > nc::fft::ifft2 | ( | const NdArray< dtype > & | inArray, |
| const Shape & | inShape | ||
| ) |
Compute the 2-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft2.html#numpy.fft.ifft2
| inArray | |
| inShape | Shape (length of each transformed axis) of the output |
| NdArray< std::complex< double > > nc::fft::ifft2 | ( | const NdArray< std::complex< dtype > > & | inArray | ) |
Compute the 2-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft2.html#numpy.fft.ifft2
| inArray |
| NdArray< std::complex< double > > nc::fft::ifft2 | ( | const NdArray< std::complex< dtype > > & | inArray, |
| const Shape & | inShape | ||
| ) |
Compute the 2-dimensional inverse discrete Fourier Transform.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.ifft2.html#numpy.fft.ifft2
| inArray | |
| inShape | Shape (length of each transformed axis) of the output |
| NdArray< dtype > nc::fft::ifftshift | ( | const NdArray< dtype > & | inX, |
| Axis | inAxis = Axis::NONE |
||
| ) |
The inverse of fftshift. Although identical for even-length x, the functions differ by one sample for odd-length x.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.ifftshift.html
| inX | input array |
| inAxis | (Optional) Axes over which to shift. Default is None, which shifts all axes. |
| NdArray< double > nc::fft::irfft | ( | const NdArray< std::complex< dtype > > & | inArray, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional inverse discrete Fourier Transform for real inputs.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.irfft.html#numpy.fft.irfft
| inArray | |
| inAxis | (Optional, default NONE) |
| NdArray< double > nc::fft::irfft | ( | const NdArray< std::complex< dtype > > & | inArray, |
| uint32 | inN, | ||
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional inverse discrete Fourier Transform for real inputs.
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.irfft.html#numpy.fft.irfft
| inArray | |
| inN | Length of the transformed axis of the output. |
| inAxis | (Optional, default NONE) |
| NdArray< double > nc::fft::irfft2 | ( | const NdArray< std::complex< dtype > > & | inArray | ) |
Computes the inverse of rfft2.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.irfft2.html
| inArray |
| NdArray< double > nc::fft::irfft2 | ( | const NdArray< std::complex< dtype > > & | inArray, |
| const Shape & | inShape | ||
| ) |
Computes the inverse of rfft2.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.irfft2.html
| inArray | |
| inShape | Shape (length of each transformed axis) of the output |
| NdArray< std::complex< double > > nc::fft::rfft | ( | const NdArray< dtype > & | inArray, |
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional discrete Fourier Transform for real input
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.rfft.html#numpy.fft.rfft
| inArray | |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::rfft | ( | const NdArray< dtype > & | inArray, |
| uint32 | inN, | ||
| Axis | inAxis = Axis::NONE |
||
| ) |
Compute the one-dimensional discrete Fourier Transform for real input
NumPy Reference: https://numpy.org/doc/2.3/reference/generated/numpy.fft.rfft.html#numpy.fft.rfft
| inArray | |
| inN | Length of the transformed axis of the output. |
| inAxis | (Optional, default NONE) |
| NdArray< std::complex< double > > nc::fft::rfft2 | ( | const NdArray< dtype > & | inArray | ) |
Compute the 2-dimensional FFT of a real array.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.rfft2.html
| inArray |
| NdArray< std::complex< double > > nc::fft::rfft2 | ( | const NdArray< dtype > & | inArray, |
| const Shape & | inShape | ||
| ) |
Compute the 2-dimensional FFT of a real array.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.rfft2.html
| inArray | |
| inShape | Shape (length of each transformed axis) of the output |
Return the Discrete Fourier Transform sample frequencies (for usage with rfft, irfft). The returned float array f contains the frequency bin centers in cycles per unit of the sample spacing (with zero at the start). For instance, if the sample spacing is in seconds, then the frequency unit is cycles/second.
NumPy Reference: https://numpy.org/doc/stable/reference/generated/numpy.fft.rfftfreq.html
| inN | Window Length |
| inD | (Optional) Sample spacing (inverse of the sampling rate). Defaults to 1. |