I want to create an interpolation object which uses the Flat() option when extrapolating, but I run into “Flat() not defined” when specifying it so. The Line() option works well.
Eg., the following works
interp1 = LinearInterpolation(1:5, 2:6, extrapolation_bc=Line())
interp1(6.0) returns 7.0
while
interp2 = LinearInterpolation(1:5, 2:6, extrapolation_bc=Flat())
returns ERROR: UndefVarError: Flat not defined
Is this a bug or am I using the option wrong?