code: def ttm(self, V, mode=None, transp=False, without=False):
          
          if mode is None:
              mode = range(self.ndim)
          if isinstance(V, np.ndarray):
              Y = self._ttm_compute(V, mode, transp)
          elif is_sequence(V):
              dims, vidx = check_multiplication_dims(mode, self.ndim, len(V), vidx=True, without=without)
              Y = self._ttm_compute(V[vidx[0]], dims[0], transp)
              for i in xrange(1, len(dims)):
                  Y = Y._ttm_compute(V[vidx[i]], dims[i], transp)
          return Y
docs: Tensor times matrix product
  
          Parameters
          ----------
          V : M x N array_like or list of M_i x N_i array_likes
              Matrix or list of matrices for which the tensor times matrix
              products should be performed
          mode : int or list of int's, optional
              Modes along which the tensor times matrix products should be
              performed
          transp: boolean, optional
              If True, tensor times matrix products are computed with
              transpositions of matrices
          without: boolean, optional
              It True, tensor times matrix products are performed along all
              modes **except** the modes specified via parameter ``mode``
  
  
          Examples
          --------
          Create dense tensor
  
          >>> T = zeros((3, 4, 2))
          >>> T[:, :, 0] = [[ 1,  4,  7, 10], [ 2,  5,  8, 11], [3,  6,  9, 12]]
          >>> T[:, :, 1] = [[13, 16, 19, 22], [14, 17, 20, 23], [15, 18, 21, 24]]
          >>> T = dtensor(T)
  
          Create matrix
  
          >>> V = array([[1, 3, 5], [2, 4, 6]])
  
          Multiply tensor with matrix along mode 0
  
          >>> Y = T.ttm(V, 0)
          >>> Y[:, :, 0]
          array([[  22.,   49.,   76.,  103.],
              [  28.,   64.,  100.,  136.]])
          >>> Y[:, :, 1]
          array([[ 130.,  157.,  184.,  211.],
              [ 172.,  208.,  244.,  280.]])