aliutkus / torchinterp1d

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

Fix epsilon bug #6

Closed cifkao closed 4 years ago

cifkao commented 4 years ago

Should fix #5.

The problem is that eps + x == x if x is large enough, so eps + x - x == 0., and the slope will be infinite. So we first need to subtract and then add eps.

aliutkus commented 4 years ago

good catch, thanks