I want to plot ellipse with pytorch, Convert the below code to pytorch.

```
def ellipse(n, R=1):
theta = random.uniform(0, 360, n)
X1 = R * np.cos(theta)
X2 = R * np.sin(theta)
X1 = X1.reshape(n, 1)
X2 = X2.reshape(n, 1)
X = hstack((X1, X2))
y = ones((n, 1))
return X, y
```