Method: Numo::Pocketfft.fft
- Defined in:
- lib/numo/pocketfft.rb
.fft(a) ⇒ Numo::DComplex
Compute the 1-dimensional discrete Fourier Transform.
15 16 17 18 19 20 21 |
# File 'lib/numo/pocketfft.rb', line 15 def fft(a) raise ArgumentError, 'Expect class of input array to be Numo::NArray.' unless a.is_a?(Numo::NArray) raise ArgumentError, 'Expect input array to be non-empty.' if a.empty? raise ArgumentError, 'Expect input array to be one-dimensional.' unless a.ndim == 1 raw_fft(a, 0, inverse: false, real: false) end |