What is the expected / desired behavior for the last line in this snippet?
using GridInterpolations
r = GridInterpolations.RectangleGrid(1:4, 1:4)
interpolants(r, [2.5, 3.5]) # business as usual
interpolants(r, [2.5, NaN]) # expected behavior?
The output is ([-2, -1, 2, 3], [NaN, NaN, NaN, NaN]).
While NaN weights seem to make sense, the indices seem kind of dangerous (imagine someone is just checking for the support, not the actual weights).
What would be a sane behavior? Maybe ([0], [NaN]) or ([NaN],[NaN])? Or just checking for NaNs at the beginning of the call? Throwing an error?
What is the expected / desired behavior for the last line in this snippet?
The output is
([-2, -1, 2, 3], [NaN, NaN, NaN, NaN])
. WhileNaN
weights seem to make sense, the indices seem kind of dangerous (imagine someone is just checking for the support, not the actual weights).What would be a sane behavior? Maybe
([0], [NaN])
or([NaN],[NaN])
? Or just checking forNaN
s at the beginning of the call? Throwing an error?@MaximeBouton