Dear PyTorch community,

assume that I have a one-dimensional tensor

```
torch::Tensor base = torch::linspace(0,1,10);
```

as attribute of a class.

In a member function of this class I want to return a new tensor that is composed of individual entries of the `base`

tensor, e.g.

```
torch::Tensor eval(int k)
{
return { base[k], base[k+1] }; // This code does not compile, it's only meant for illustration purposes
}
```

This is just one example. In my real application I want to return 2d tensors, e.g., of the form

```
[ [ base[k] , base[k+1] , 0]
[ 0 , base[k+2] , base[k+3] ] ]
```

Any help is appreciated.