code: def softplus(
      x: np.ndarray,
      /,
      *,
      beta: Optional[Union[int, float]] = None,
      threshold: Optional[Union[int, float]] = None,
      complex_mode="jax",
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      if beta is not None and beta != 1:
          x_beta = x * beta
          res = (
              np.add(
                  np.log1p(np.exp(-np.abs(x_beta))),
                  np.maximum(x_beta, 0, dtype=x.dtype),
                  out=out,
              )
          ) / beta
      else:
          x_beta = x
          res = np.add(
              np.log1p(np.exp(-np.abs(x_beta))),
              np.maximum(x_beta, 0, dtype=x.dtype),
              out=out,
          )
      if threshold is not None:
          return np.where(x_beta > threshold, x, res).astype(x.dtype)
      return res.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 6 for calling a global function with example usage: softplus() and returns: res, np