class_docstr: Class to handle problems with one single objective function.
  
  param func: objective function.
  param batch_size: size of the batches (default, 1)
  param num_cores: number of cores to use in the process of evaluating the objective (default, 1).
  param objective_name: name of the objective function.
  param batch_type: Type of batch used. Only 'synchronous' evaluations are possible at the moment.
  param space: Not in use.
  
  .. Note:: the objective function should take 2-dimensional numpy arrays as input and outputs. Each row should
  contain a location (in the case of the inputs) or a function evaluation (in the case of the outputs).
class_docstr_tok: ["Class","to","handle","problems","with","one","single","objective","function",".","param","func",":","objective","function",".","param","batch_size",":","size","of","the","batches","(","default",",","1",")","param","num_cores",":","number","of","cores","to","use","in","the","process","of","evaluating","the","objective","(","default",",","1",")",".","param","objective_name",":","name","of","the","objective","function",".","param","batch_type",":","Type","of","batch","used",".","Only","'synchronous","'","evaluations","are","possible","at","the","moment",".","param","space",":","Not","in","use",".","..","Note",":",":","the","objective","function","should","take","2-dimensional","numpy","arrays","as","input","and","outputs",".","Each","row","should","contain","a","location","(","in","the","case","of","the","inputs",")","or","a","function","evaluation","(","in","the","case","of","the","outputs",")","."]
docstr: Performs sequential evaluations of the function at x (single location or batch). The computing time of each
  evaluation is also provided.
docstr_tok: ["Performs","sequential","evaluations","of","the","function","at","x","(","single","location","or","batch",")",".","The","computing","time","of","each","evaluation","is","also","provided","."]
code: def _eval_func(self, x):
      """
      Performs sequential evaluations of the function at x (single location or batch). The computing time of each
      evaluation is also provided.
      """
      cost_evals = []
      f_evals = np.empty(shape=[0, 1])
  
      for i in range(x.shape[0]):
          st_time = time.time()
          rlt = self.func(np.atleast_2d(x[i]))
          f_evals = np.vstack([f_evals, rlt])
          cost_evals += [time.time() - st_time]
      return f_evals, cost_evals
  
file_path: GPyOpt/GPyOpt/core/task/objective.py
imports: import time
  import numpy
  from ...util.general import spawn
  from ...util.general import get_d_moments
  import GPy
  import GPyOpt
label_desc: Use image node_id 3 for calling the SingleObjective obj's underlying member method code with example usage: obj._eval_func(x) and returns: f_evals,  cost_evals