class_docstr: A unit test to test ancillary utils in setting up a cartesian product GP. 
class_docstr_tok: ["A","unit","test","to","test","ancillary","utils","in","setting","up","a","cartesian","product","GP","."]
docstr: Tests packing and unpacking. 
docstr_tok: ["Tests","packing","and","unpacking","."]
code: def test_packing_and_unpacking_points(self):
      """Tests packing and unpacking."""
      self.report("Testing packing and unpacking points.")
      num_samples = 8
      for idx, dcf in enumerate(self.domain_config_files):
          self.report(
              "[%d/%d] Testing packing/unpacking from %s."
              % (idx + 1, len(self.domain_config_files), dcf)
          )
          (
              cp_dom,
              orderings,
          ) = cp_domain_utils.load_cp_domain_from_config_file(dcf)
          self.report("Domain: %s" % (cp_dom), "test_result")
          proc_samples_1 = cp_domain_utils.sample_from_cp_domain(
              cp_dom, num_samples
          )
          raw_samples_1 = [
              cp_domain_utils.get_raw_point_from_processed_point(
                  x,
                  cp_dom,
                  orderings.index_ordering,
                  orderings.dim_ordering,
              )
              for x in proc_samples_1
          ]
          proc_samples_2 = [
              cp_domain_utils.get_processed_point_from_raw_point(
                  x,
                  cp_dom,
                  orderings.index_ordering,
                  orderings.dim_ordering,
              )
              for x in raw_samples_1
          ]
          raw_samples_2 = [
              cp_domain_utils.get_raw_point_from_processed_point(
                  x,
                  cp_dom,
                  orderings.index_ordering,
                  orderings.dim_ordering,
              )
              for x in proc_samples_2
          ]
          self._test_if_two_lists_of_objects_are_equal(
              proc_samples_1, proc_samples_2
          )
          self._test_if_two_lists_of_objects_are_equal(
              raw_samples_1, raw_samples_2
          )
      self.report("", "")
  
imports: import os
  import numpy
  from .None import cp_domain_utils
  from ..test_data.park1_3.park1_3 import park1_3
  from ..test_data.park1_3.park1_3_mf import park1_3_mf
  from ..test_data.park2_4.park2_4 import park2_4
  from ..test_data.park2_4.park2_4_mf import park2_4_mf
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.general_utils import get_idxs_from_list_of_lists
label_desc: Use image node_id 6 for calling the CPDomainUtilsTestCase obj's underlying member method code with example usage: obj.test_packing_and_unpacking_points() without return types