class_docstr: This helps numerical stability.
class_docstr_tok: ["This","helps","numerical","stability","."]
code: def static_impl(x):
      if x < -30.0:
          return 0.0
      if x > 30.0:
          return x
      # If x is an int8 or uint8, numpy.exp will compute the result in
      # half-precision (float16), where we want float32.
      x_dtype = str(getattr(x, "dtype", ""))
      if x_dtype in ("int8", "uint8"):
          return np.log1p(np.exp(x, sig="f"))
      return np.log1p(np.exp(x))
  
imports: from __future__ import absolute_import, print_function, division
  import warnings
  import numpy
  import theano
  from theano import config, gof, printing, scalar
  from theano.compat import imap
  from theano.printing import pprint
  from theano.tensor import basic
  from theano.tensor import elemwise, opt, NotScalarConstantError
  from theano.tensor.type import values_eq_approx_remove_inf
  from theano.gof.opt import copy_stack_trace
label_desc: Use image node_id 1 for calling the ScalarSoftplus obj's underlying member method code with example usage: obj.static_impl(x) and returns: np, int, x, np