code: def sigmoid(
      x: np.ndarray,
      /,
      *,
      complex_mode="jax",
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if not ivy.is_array(x):
          return np.asarray(1 / (1 + np.exp(-x)))
      return np.asarray(1 / (1 + np.exp(-x))).astype(x.dtype)
  
file_path: ivy/ivy/functional/backends/numpy/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
label_desc: Use image node_id 4 for calling a global function with example usage: sigmoid() and returns: np, np