code: def ifft(
      x: Array,
      /,
      *,
      n: Optional[int] = None,
      axis: int = -1,
      norm: Literal["backward", "ortho", "forward"] = "backward",
  ) -> Array:
      """
      Array API compatible wrapper for :py:func:`np.fft.ifft <numpy.fft.ifft>`.
  
      See its docstring for more information.
      """
      if x.dtype not in _complex_floating_dtypes:
          raise TypeError(
              "Only complex floating-point dtypes are allowed in ifft"
          )
      res = Array._new(np.fft.ifft(x._array, n=n, axis=axis, norm=norm))
      # Note: np.fft functions improperly upcast float32 and complex64 to
      # complex128
      if x.dtype == complex64:
          return astype(res, complex64)
      return res
  
file_path: numpy/numpy/array_api/fft.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Union, Optional, Literal
  from ._dtypes import _floating_dtypes, _real_floating_dtypes, _complex_floating_dtypes, float32, complex64
  from ._array_object import Array
  from ._data_type_functions import astype
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: ifft() and returns: res, astype