class_docstr: AbstractSolver base class for mystic optimizers.
      
class_docstr_tok: ["AbstractSolver","base","class","for","mystic","optimizers","."]
docstr: ensure that initial guess is set within bounds
  
  input::
      - x0: must be a sequence of length self.nDim
      - at: bool, if True, then clip at the bounds
code: def _clipGuessWithinRangeBoundary(self, x0, at=True):
      """ensure that initial guess is set within bounds
  
      input::
          - x0: must be a sequence of length self.nDim
          - at: bool, if True, then clip at the bounds"""
      # if len(x0) != self.nDim: #XXX: unnecessary w/ self.trialSolution
      #    raise ValueError, "initial guess must be length %s" % self.nDim
      x0 = asarray(x0)
      bounds = (self._strictMin, self._strictMax)
      if not len(self._strictMin):
          return x0
      # clip x0 at bounds
      settings = numpy.seterr(all="ignore")
      x_ = x0.clip(*bounds)
      numpy.seterr(**settings)
      if at:
          return x_
      # clip x0 within bounds
      x_ = x_ != x0
      x0[x_] = random.uniform(self._strictMin, self._strictMax)[x_]
      return x0
  
imports: import random
  import numpy
  from numpy import inf, shape, asarray, absolute, asfarray, seterr
  from mystic.tools import wrap_function, wrap_nested, wrap_reducer
  from mystic.tools import wrap_bounds, wrap_penalty, reduced
  from klepto import isvalid, validate
  from collections.abc import Callable
label_desc: Use image node_id 20 for calling the AbstractSolver obj's underlying member method code with example usage: obj._clipGuessWithinRangeBoundary(x0, at) and returns: x0, x0, x_