prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  rfftn
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `ivy/functional/frontends/scipy/fft/fft.py`
  Content:
  ```
  1 # global
  2 import ivy
  3 from ivy.functional.frontends.scipy.func_wrapper import (
  4     to_ivy_arrays_and_back,
  5 )
  6 
  7 
  8 # fft
  9 @to_ivy_arrays_and_back
  10 def fft(x, n=None, axis=-1, norm="backward", overwrite_x=False):
  11     return ivy.fft(x, axis, norm=norm, n=n)
  12 
  13 
  14 # ifft
  15 @to_ivy_arrays_and_back
  16 def ifft(x, n=None, axis=-1, norm="backward", overwrite_x=False):
  17     return ivy.ifft(x, axis, norm=norm, n=n)
  18 
  19 
  20 # dct
  21 @to_ivy_arrays_and_back
  22 def dct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None):
  23     return ivy.dct(x, type=type, n=n, axis=axis, norm=norm)
  24 
  25 
  26 # idct
  27 @to_ivy_arrays_and_back
  28 def idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None):
  29     inverse_type = {1: 1, 2: 3, 3: 2, 4: 4}[type]
  30     return ivy.dct(x, type=inverse_type, n=n, axis=axis, norm=norm)
  31 
  32 
  33 @to_ivy_arrays_and_back
  34 def fft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False):
  35     return ivy.fft2(x, s=s, dim=axes, norm=norm)
  36 
  37 
  38 @to_ivy_arrays_and_back
  39 def ifftn(
  40     x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
  41 ):
  42     return ivy.ifftn(x, s=s, dim=axes, norm=norm)
  43
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py
  --- a/ivy/functional/frontends/scipy/fft/fft.py
  +++ b/ivy/functional/frontends/scipy/fft/fft.py
  @@ -40,3 +40,10 @@
       x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
   ):
       return ivy.ifftn(x, s=s, dim=axes, norm=norm)
  +
  +
  +@to_ivy_arrays_and_back
  +def rfftn(
  +    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None
  +):
  +    return ivy.rfftn(x, s=s, dim=axes, norm=norm)
  
verification_info: {"golden_diff": "diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py\n--- a/ivy/functional/frontends/scipy/fft/fft.py\n+++ b/ivy/functional/frontends/scipy/fft/fft.py\n@@ -40,3 +40,10 @@\n     x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n ):\n     return ivy.ifftn(x, s=s, dim=axes, norm=norm)\n+\n+\n+@to_ivy_arrays_and_back\n+def rfftn(\n+    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n+):\n+    return ivy.rfftn(x, s=s, dim=axes, norm=norm)\n", "issue": "rfftn\n\n", "before_files": [{"content": "# global\nimport ivy\nfrom ivy.functional.frontends.scipy.func_wrapper import (\n    to_ivy_arrays_and_back,\n)\n\n\n# fft\n@to_ivy_arrays_and_back\ndef fft(x, n=None, axis=-1, norm=\"backward\", overwrite_x=False):\n    return ivy.fft(x, axis, norm=norm, n=n)\n\n\n# ifft\n@to_ivy_arrays_and_back\ndef ifft(x, n=None, axis=-1, norm=\"backward\", overwrite_x=False):\n    return ivy.ifft(x, axis, norm=norm, n=n)\n\n\n# dct\n@to_ivy_arrays_and_back\ndef dct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None):\n    return ivy.dct(x, type=type, n=n, axis=axis, norm=norm)\n\n\n# idct\n@to_ivy_arrays_and_back\ndef idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None):\n    inverse_type = {1: 1, 2: 3, 3: 2, 4: 4}[type]\n    return ivy.dct(x, type=inverse_type, n=n, axis=axis, norm=norm)\n\n\n@to_ivy_arrays_and_back\ndef fft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False):\n    return ivy.fft2(x, s=s, dim=axes, norm=norm)\n\n\n@to_ivy_arrays_and_back\ndef ifftn(\n    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n):\n    return ivy.ifftn(x, s=s, dim=axes, norm=norm)\n", "path": "ivy/functional/frontends/scipy/fft/fft.py"}], "after_files": [{"content": "# global\nimport ivy\nfrom ivy.functional.frontends.scipy.func_wrapper import (\n    to_ivy_arrays_and_back,\n)\n\n\n# fft\n@to_ivy_arrays_and_back\ndef fft(x, n=None, axis=-1, norm=\"backward\", overwrite_x=False):\n    return ivy.fft(x, axis, norm=norm, n=n)\n\n\n# ifft\n@to_ivy_arrays_and_back\ndef ifft(x, n=None, axis=-1, norm=\"backward\", overwrite_x=False):\n    return ivy.ifft(x, axis, norm=norm, n=n)\n\n\n# dct\n@to_ivy_arrays_and_back\ndef dct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None):\n    return ivy.dct(x, type=type, n=n, axis=axis, norm=norm)\n\n\n# idct\n@to_ivy_arrays_and_back\ndef idct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False, orthogonalize=None):\n    inverse_type = {1: 1, 2: 3, 3: 2, 4: 4}[type]\n    return ivy.dct(x, type=inverse_type, n=n, axis=axis, norm=norm)\n\n\n@to_ivy_arrays_and_back\ndef fft2(x, s=None, axes=(-2, -1), norm=None, overwrite_x=False):\n    return ivy.fft2(x, s=s, dim=axes, norm=norm)\n\n\n@to_ivy_arrays_and_back\ndef ifftn(\n    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n):\n    return ivy.ifftn(x, s=s, dim=axes, norm=norm)\n\n\n@to_ivy_arrays_and_back\ndef rfftn(\n    x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n):\n    return ivy.rfftn(x, s=s, dim=axes, norm=norm)\n", "path": "ivy/functional/frontends/scipy/fft/fft.py"}]}