Pytorch function calling
I am trying to compute a trignometric function using pytorch, but having issues while calling it via function, below is my code:-
def func(x,y):
  return torch.exp(torch.sin(x)/x-y)

func(torch.tensor[2,3])



Error:-
TypeError - Traceback (most recent call last)
&lt;ipython-input-16-beb818f912f5&gt; in &lt;module&gt;()
----&gt; 1 func(torch.tensor([2, 3]))

TypeError: newf() missing 1 required positional argument: 'y'

What is incorrect in this code while calling the function?

You need to do it with unpacking:
func(*torch.tensor[2,3])

