code: def toarray(self):
          
          A = dot(self.lmbda, khatrirao(tuple(self.U)).T)
          return A.reshape(self.shape)
docs: Converts a ktensor into a dense multidimensional ndarray
  
          Returns
          -------
          arr : np.ndarray
              Fully computed multidimensional array whose shape matches
              the original ktensor.