docs: def teneye(dim, order):
      """
      Create tensor with superdiagonal all one, rest zeros
      """
      I = zeros(dim ** order)
      for f in range(dim):
          idd = f
          for i in range(1, order):
              idd = idd + dim ** (i - 1) * (f - 1)
          I[idd] = 1
      return I.reshape(ones(order) * dim)