parameters: (self, train_path)
docstring: Set file path of training data.
  
          Parameters
          ----------
          train_path : str
             the path of training data
docstring_summary: Set file path of training data.
docstring_tokens: Set file path of training data .
function: def setTrain(self, train_path):
          """Set file path of training data.
  
          Parameters
          ----------
          train_path : str
             the path of training data
          """
          if isinstance(train_path, str):
              _check_call(_LIB.XLearnSetTrain(ctypes.byref(self.handle), c_str(train_path)))
              _check_call(_LIB.XLearnSetBool(ctypes.byref(self.handle), c_str("from_file"), ctypes.c_bool(True)))
          elif isinstance(train_path, DMatrix):
              key = "train"
              _check_call(_LIB.XLearnSetDMatrix(ctypes.byref(self.handle), c_str(key), ctypes.byref(train_path.handle)))
              _check_call(_LIB.XLearnSetBool(ctypes.byref(self.handle), c_str("from_file"), ctypes.c_bool(False)))
          else:
              raise Exception("Invalid train.Can be test file path or xLearn DMatrix", type(train_path))
function_tokens: def setTrain ( self , train_path ) : if isinstance ( train_path , str ) : _check_call ( _LIB . XLearnSetTrain ( ctypes . byref ( self . handle ) , c_str ( train_path ) ) ) _check_call ( _LIB . XLearnSetBool ( ctypes . byref ( self . handle ) , c_str ( "from_file" ) , ctypes . c_bool ( True ) ) ) elif isinstance ( train_path , DMatrix ) : key = "train" _check_call ( _LIB . XLearnSetDMatrix ( ctypes . byref ( self . handle ) , c_str ( key ) , ctypes . byref ( train_path . handle ) ) ) _check_call ( _LIB . XLearnSetBool ( ctypes . byref ( self . handle ) , c_str ( "from_file" ) , ctypes . c_bool ( False ) ) ) else : raise Exception ( "Invalid train.Can be test file path or xLearn DMatrix" , type ( train_path ) )