code: def test_grad_rfft(self):
      # The numerical gradient of the FFT is sensitive, must set large
      # enough epsilon to get good accuracy.
      eps = 1e-1
  
      def f_rfft(inp):
          return fft.rfft(inp)
  
      inputs_val = np.random.random((1, N, N)).astype(
          pytensor.config.floatX
      )
      utt.verify_grad(f_rfft, [inputs_val], eps=eps)
  
      def f_irfft(inp):
          return fft.irfft(inp)
  
      inputs_val = np.random.random((1, N, N // 2 + 1, 2)).astype(
          pytensor.config.floatX
      )
      utt.verify_grad(f_irfft, [inputs_val], eps=eps)
  
      def f_rfft(inp):
          return fft.rfft(inp, norm="ortho")
  
      inputs_val = np.random.random((1, N, N)).astype(
          pytensor.config.floatX
      )
      utt.verify_grad(f_rfft, [inputs_val], eps=eps)
  
      def f_irfft(inp):
          return fft.irfft(inp, norm="no_norm")
  
      inputs_val = np.random.random((1, N, N // 2 + 1, 2)).astype(
          pytensor.config.floatX
      )
      utt.verify_grad(f_irfft, [inputs_val], eps=eps)
  
file_path: pytensor/tests/tensor/test_fft.py
imports: import numpy
  import pytest
  import pytensor
  from pytensor.tensor import fft
  from pytensor.tensor.type import matrix
  from tests import unittest_tools
label_desc: Use image node_id 7 for calling the TestFFT obj's underlying member method code with example usage: obj.test_grad_rfft() and returns: fft, fft, fft, fft