class_docstr: The main class of the dynamic linear model.
  
  
  This is the main class of the Bayeisan dynamic linear model.
  It provides the modeling, filtering, forecasting and smoothing
  function of a dlm.
  The dlm use the @builder to construct the @baseModel based on user supplied
  @components and then run @kalmanFilter to filter the result.
  
  Example 1:
      >>> # randomly generate fake data on 1000 days
      >>> import numpy as np
      >>> data = np.random.random((1, 1000))
      >>> # construct the dlm of a linear trend and a 7-day seasonality
      >>> myDlm = dlm(data) + trend(degree = 2, 0.98) + seasonality(period = 7, 0.98)
      >>> # filter the result
      >>> myDlm.fitForwardFilter()
      >>> # extract the filtered result
      >>> myDlm.getFilteredObs()
  
  Example 2 (fit a linear regression):
      >>> from pydlm import dynamic
      >>> data = np.random.random((1, 100))
      >>> mydlm = dlm(data) + trend(degree=1, 0.98, name='a') +
                      dynamic(features=[[i] for i in range(100)], 1, name='b')
      >>> mydlm.fit()
      >>> coef_a = mydlm.getLatentState('a')
      >>> coef_b = mydlm.getLatentState('b')
  
  Attributes:
     data: a list of doubles of the raw time series data.
           It could be either the python's built-in list of
           doubles or numpy 1d array.
docstr: Append the new data to the main data or the components (new feature data)
  
  Args:
      data: the new data
      component: the name of which the new data to be added to.
  
                 'main': the main time series data
  
                 other omponent name: add new feature data to other
                 component.
docstr_tok: ["Append","the","new","data","to","the","main","data","or","the","components","(","new","feature","data",")","Args",":","data",":","the","new","data","component",":","the","name","of","which","the","new","data","to","be","added","to",".","'main","'",":","the","main","time","series","data","other","omponent","name",":","add","new","feature","data","to","other","component","."]
code: def append(self, data, component="main"):
      """Append the new data to the main data or the components (new feature data)
  
      Args:
          data: the new data
          component: the name of which the new data to be added to.\n
                     'main': the main time series data\n
                     other omponent name: add new feature data to other
                     component.
  
      """
      # initialize the model to ease the modification
      if not self.initialized:
          self._initialize()
  
      # if we are adding new data to the time series
      if component == "main":
          # add the data to the self.data
          self.data.extend(list(data))
  
          # update the length
          self.n += len(data)
          self.result._appendResult(len(data))
  
          # update the automatic components as well
          for component in self.builder.automaticComponents:
              comp = self.builder.automaticComponents[component]
              comp.appendNewData(data)
  
          # give a warning to remind to append dynamic components
          if len(self.builder.dynamicComponents) > 0:
              self._logger.warning(
                  "Dynamic components need to manually append new data "
                  "when main data has been appended."
              )
  
      # if we are adding new data to the features of dynamic components
      elif component in self.builder.dynamicComponents:
          comp = self.builder.dynamicComponents[component]
          comp.appendNewData(data)
  
      else:
          raise ValueError("Such dynamic component does not exist.")
  
imports: from copy import deepcopy
  from numpy import matrix
  from pydlm.predict.dlmPredictMod import dlmPredictModule
  from pydlm.access.dlmAccessMod import dlmAccessModule
  from pydlm.tuner.dlmTuneMod import dlmTuneModule
  from pydlm.plot.dlmPlotMod import dlmPlotModule
label_desc: Use image node_id 11 for calling the dlm obj's underlying member method code with example usage: obj.append(data, component) without return types