docstr: a model object, to be used with OUQ classes
  
  Input:
      id: string, unique id for model instance [default: model.__name__]
      model: a model function, of form y = model(x, axis=None)
  
  Additional Input:
      nx: int, number of model inputs, len(x) [default: None]
      ny: int, number of model outputs, len(y) [default: None]
      rnd: bool, if False, treat the model as deterministic [default: True]
      uid: bool, if True, append a random integer in [0, 1e16] to __name__
      cached: bool, if True, use a mystic.cache [default: False]
  
  NOTE:
      any additional keyword arguments will be passed to 'model'
  
  NOTE:
      if cached is True, the default is to create a klepto.dir_archive
      using the name of the model; alternately, an archive can be specified
      by passing an archive instance (or string name) to the cached keyword.
      
docstr_tok: ["a","model","object",",","to","be","used","with","OUQ","classes","Input",":","id",":","string",",","unique","id","for","model","instance","[","default",":","model.__name__","]","model",":","a","model","function",",","of","form","y","=","model","(","x",",","axis=None",")","Additional","Input",":","nx",":","int",",","number","of","model","inputs",",","len","(","x",")","[","default",":","None","]","ny",":","int",",","number","of","model","outputs",",","len","(","y",")","[","default",":","None","]","rnd",":","bool",",","if","False",",","treat","the","model","as","deterministic","[","default",":","True","]","uid",":","bool",",","if","True",",","append","a","random","integer","in","[","0",",","1e16","]","to","__name__","cached",":","bool",",","if","True",",","use","a","mystic.cache","[","default",":","False","]","NOTE",":","any","additional","keyword","arguments","will","be","passed","to","'model'","NOTE",":","if","cached","is","True",",","the","default","is","to","create","a","klepto.dir_archive","using","the","name","of","the","model",";","alternately",",","an","archive","can","be","specified","by","passing","an","archive","instance","(","or","string","name",")","to","the","cached","keyword","."]
code: def __init__(self, id=None, model=None, **kwds):
      """a model object, to be used with OUQ classes
  
      Input:
          id: string, unique id for model instance [default: model.__name__]
          model: a model function, of form y = model(x, axis=None)
  
      Additional Input:
          nx: int, number of model inputs, len(x) [default: None]
          ny: int, number of model outputs, len(y) [default: None]
          rnd: bool, if False, treat the model as deterministic [default: True]
          uid: bool, if True, append a random integer in [0, 1e16] to __name__
          cached: bool, if True, use a mystic.cache [default: False]
  
      NOTE:
          any additional keyword arguments will be passed to 'model'
  
      NOTE:
          if cached is True, the default is to create a klepto.dir_archive
          using the name of the model; alternately, an archive can be specified
          by passing an archive instance (or string name) to the cached keyword.
      """
      # get state defined in model
      if model is None:
          msg = "a callable model, y = model(x), is required"
          raise NotImplementedError(msg)
      model = _init_axis(model)  # FIXME: class method?
      self.nx = kwds.pop("nx", getattr(model, "nx", None))
      self.ny = kwds.pop("ny", getattr(model, "ny", None))
      self.rnd = kwds.pop("rnd", getattr(model, "rnd", True))
      self.__model__ = model
      self.__name__ = self.__model__.__name__ if id is None else id
      self.__model__.__name__ = self.__name__
      self.__kwds__ = kwds.copy()
      # FIXME: ugly. this *must* be called *after* any subclass's init
      super(self.__class__, self).__init__(id, ok=True, **kwds)
      return
  
label_desc: Use image node_id 1 to create a new WrapModel object from inherited base classes: OUQModel with example: obj = WrapModel(id, model)