code: def logit(
      x: np.ndarray,
      /,
      *,
      eps: Optional[float] = None,
      complex_mode: Literal["split", "magnitude", "jax"] = "jax",
      out: Optional[np.ndarray] = None,
  ):
      x_dtype = x.dtype
      if eps is None:
          x = np.where(np.logical_or(x > 1, x < 0), np.nan, x)
      else:
          x = np.clip(x, eps, 1 - eps)
      ret = (np.log(x / (1 - x))).astype(x_dtype)
      if np.isscalar(ret):
          return np.array(ret)
      return ret
  
file_path: ivy/ivy/functional/backends/numpy/experimental/activations.py
imports: from typing import Optional, Union, Literal
  import numpy
  import ivy
  from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 1 for calling a global function with example usage: logit() and returns: ret, np