Method: Numo::Pocketfft.rfft2
- Defined in:
- lib/numo/pocketfft.rb
.rfft2(a) ⇒ Numo::DComplex
Compute the 2-dimensional discrete Fourier Transform for real input.
119 120 121 122 123 124 125 |
# File 'lib/numo/pocketfft.rb', line 119 def rfft2(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 two-dimensional.' unless a.ndim == 2 rfftn(a) end |