code: def fit(self, X, truncated=3):
          
          self.n_sample, self.n_var = X.shape
          self.columns = X.columns
          self.tau_mat = X.corr(method='kendall').values
          self.u_matrix = np.empty([self.n_sample, self.n_var])
  
          self.truncated = truncated
          self.depth = self.n_var - 1
          self.trees = []
  
          self.unis, self.ppfs = [], []
          for i, col in enumerate(X):
              uni = self.model()
              uni.fit(X[col])
              self.u_matrix[:, i] = uni.cumulative_distribution(X[col])
              self.unis.append(uni)
              self.ppfs.append(uni.percent_point)
  
          self.train_vine(self.vine_type)
          self.fitted = True
docs: Fit a vine model to the data.
  
          Args:
              X(numpy.ndarray): data to be fitted.
              truncated(int): max level to build the vine.