class_docstr: Holds the param-space coordinates (X) and target values (Y)
  
  Parameters
  ----------
  pbounds : dict
      Dictionary with parameters names and legal values.
  
  random_state : int, RandomState, or None
      optionally specify a seed for a random number generator, by default None.
class_docstr_tok: ["Holds","the","param-space","coordinates","(","X",")","and","target","values","(","Y",")","Parameters","--","--","--","--","--","pbounds",":","dict","Dictionary","with","parameters","names","and","legal","values",".","random_state",":","int",",","RandomState",",","or","None","optionally","specify","a","seed","for","a","random","number","generator",",","by","default","None","."]
docstr: dict to array
  
  Parameters
  ----------
  params : dict
      dict format of parameters
  
  Returns
  -------
  numpy array
      array format of parameters
docstr_tok: ["dict","to","array","Parameters","--","--","--","--","--","params",":","dict","dict","format","of","parameters","Returns","--","--","--","-","numpy","array","array","format","of","parameters"]
code: def params_to_array(self, params):
      """
      dict to array
  
      Parameters
      ----------
      params : dict
          dict format of parameters
  
      Returns
      -------
      numpy array
          array format of parameters
      """
      try:
          assert set(params) == set(self.keys)
      except AssertionError:
          raise ValueError(
              "Parameters' keys ({}) do ".format(sorted(params))
              + "not match the expected set of keys ({}).".format(
                  self.keys
              )
          )
      return np.asarray([params[key] for key in self.keys])
  
file_path: nni/nni/algorithms/hpo/gp_tuner/target_space.py
imports: import numpy
  import nni.parameter_expressions
label_desc: Use image node_id 9 for calling the TargetSpace obj's underlying member method code with example usage: obj.params_to_array(params) and returns: np