code: def ones(n, d=None):
      
      c = _vector.vector()
      if d is None:
          c.n = _np.array(n, dtype=_np.int32)
          c.d = c.n.size
      else:
          c.n = _np.array([n] * d, dtype=_np.int32)
          c.d = d
      c.r = _np.ones((c.d + 1,), dtype=_np.int32)
      c.get_ps()
      c.core = _np.ones(c.ps[c.d] - 1)
      return c
docs: Creates a TT-vector of all ones