Storing element in tensor?

I am trying to store an element in a tensor ; however, I believe the syntax for doing so is incorrect. Can anyone provide the correct syntax for storing an element into a tensor ?

std::vector <at::Tensor> ten_vec;
ten_vec.push_back( torch::randn({10}));
at::Tensor idxs;
      for (int x = 0; x < 10; x++){
              idxs[x] =  ten_vec[0][x].item<float>() ;