class_docstr: Unit tests for the GP class. 
class_docstr_tok: ["Unit","tests","for","the","GP","class","."]
docstr: Tests GP.add_data. 
docstr_tok: ["Tests","GP.add_data","."]
code: def test_add_data(self):
      """Tests GP.add_data."""
      self.report("GP.add_data")
      for dataset in self.datasets:
          num_new = np.random.randint(3, 10)
          X_new = np.random.random((num_new, dataset[0].shape[1]))
          Y_new = np.random.random(num_new)
          curr_gp = build_gp_with_dataset(dataset)
          curr_gp.add_data_multiple(X_new, Y_new)
          assert num_new + len(dataset[1]) == curr_gp.num_tr_data
          x_new = np.random.random(dataset[0].shape[1])
          y_new = np.random.random()
          curr_gp.add_data_single(x_new, y_new)
          assert 1 + num_new + len(dataset[1]) == curr_gp.num_tr_data
  
file_path: dragonfly/dragonfly/gp/unittest_gp_core.py
imports: from __future__ import absolute_import
  from __future__ import division
  from ..utils.base_test_class import BaseTestClass, execute_tests
  import numpy
  from .gp_core import GP
  from .kernel import SEKernel
label_desc: Use image node_id 2 for calling the GPTestCase obj's underlying member method code with example usage: obj.test_add_data() without return types