# File narray_ext.rb, line 353 def convol(a1,a2) n1x,n1y = a1.shape n2x,n2y = a2.shape raise "arrays must have same shape" if n1x!=n2x || n1y!=n2y (FFTW.fftw( FFTW.fftw(a1,-1) * FFTW.fftw(a2,-1), 1).real) / (n1x*n1y) end
# File narray_ext.rb, line 353 def convol(a1,a2) n1x,n1y = a1.shape n2x,n2y = a2.shape raise "arrays must have same shape" if n1x!=n2x || n1y!=n2y (FFTW.fftw( FFTW.fftw(a1,-1) * FFTW.fftw(a2,-1), 1).real) / (n1x*n1y) end