238238 y = randn (size (x))
239239 for dims in unique ((1 , 1 : N, N))
240240 P = plan_fft (x, dims)
241- @test (P' )' * x == P * x # test adjoint of adjoint
241+ @test (P' )' === P # test adjoint of adjoint
242242 @test size (P' ) == AbstractFFTs. output_size (P) # test size of adjoint
243243 @test dot (y, P * x) ≈ dot (P' * y, x) # test validity of adjoint
244244 @test dot (y, P \ x) ≈ dot (P' \ y, x)
@@ -259,13 +259,13 @@ end
259259 y = randn (Complex{Float64}, size (P * x))
260260 @test (P' )' * x == P * x
261261 @test size (P' ) == AbstractFFTs. output_size (P)
262- @test dot (y_real , real .(P * x)) + dot (y_imag , imag .(P * x)) ≈ dot (P' * y, x)
263- @test dot (y_real , real .(P' \ x)) + dot (y_imag , imag .(P' \ x)) ≈ dot (P \ y, x)
262+ @test dot (real .(y) , real .(P * x)) + dot (imag .(y) , imag .(P * x)) ≈ dot (P' * y, x)
263+ @test dot (real .(y) , real .(P' \ x)) + dot (imag .(y) , imag .(P' \ x)) ≈ dot (P \ y, x)
264264 Pinv = plan_irfft (y, size (x)[first (dims)], dims)
265265 @test (Pinv' )' * y == Pinv * y
266266 @test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
267- @test dot (x, Pinv * y) ≈ dot (y_real , real .(Pinv' * x)) + dot (y_imag , imag .(Pinv' * x))
268- @test dot (x, Pinv' \ y) ≈ dot (y_real , real .(Pinv \ x)) + dot (y_imag , imag .(Pinv \ x))
267+ @test dot (x, Pinv * y) ≈ dot (real .(y) , real .(Pinv' * x)) + dot (imag .(y) , imag .(Pinv' * x))
268+ @test dot (x, Pinv' \ y) ≈ dot (real .(y) , real .(Pinv \ x)) + dot (imag .(y) , imag .(Pinv \ x))
269269 end
270270 end
271271 end
0 commit comments