aliutkus / torchinterp1d

1D interpolation for pytorch
BSD 3-Clause "New" or "Revised" License
162 stars 19 forks source link

NaN output #5

Closed cifkao closed 4 years ago

cifkao commented 4 years ago

In some cases, when some of the values in x are equal, the output will be nan. For example:

>>> Interp1d()(x=torch.tensor([2., 2.]), y=torch.tensor([0., 1.]), xnew=torch.tensor([2.]))
tensor([[nan]])