please help me,
code in numpy
x_np= np.array([1,2,3])
def phi_func_np(x):
    return np.array([x, x**2])

print(phi_func_np(x_np))


result:
[[1 2 3]
 [1 4 9]]

But in pytorch, it’s error
x= torch.tensor([1,2,3])
def phi_func(x):
    return torch.tensor([x, x**2])

print(phi_func(x))