code: def delta(n, d=None, center=0):
      
      if isinstance(n, six.integer_types):
          n = [n]
      if d is None:
          n0 = _np.asanyarray(n, dtype=_np.int32)
      else:
          n0 = _np.array(n * d, dtype=_np.int32)
      d = n0.size
  
      if center < 0:
          cind = [0] * d
      else:
          cind = []
          for i in xrange(d):
              cind.append(center % n0[i])
              center //= n0[i]
          if center > 0:
              cind = [0] * d
      cr = []
      for i in xrange(d):
          cur_core = _np.zeros((1, n0[i], 1))
          cur_core[0, cind[i], 0] = 1
          cr.append(cur_core)
      return _vector.vector.from_list(cr)
docs: Create TT-vector for delta-function :math:`\\delta(x - x_0)`.