@@ -20,7 +20,7 @@ YLEN = convert(Integer, floor((YMAX - YMIN)/ΔY) + 1)
20
20
f (x) = log (x)
21
21
A = [f (x) for x in xs]
22
22
interp = LinearInterpolation (xs, A) # using convenience constructor
23
- interp_full = extrapolate (scale (interpolate (A, BSpline (Linear ()), OnGrid ()) , xs), Interpolations . Throw ()) # using full constructor
23
+ interp_full = extrapolate (scale (interpolate (A, BSpline (Linear ())) , xs), Throw ()) # using full constructor
24
24
25
25
@test typeof (interp) == typeof (interp_full)
26
26
@test interp (XMIN) ≈ f (XMIN)
@@ -37,7 +37,7 @@ YLEN = convert(Integer, floor((YMAX - YMIN)/ΔY) + 1)
37
37
f (x) = log (x)
38
38
A = [f (x) for x in xs]
39
39
interp = CubicSplineInterpolation (xs, A)
40
- interp_full = extrapolate (scale (interpolate (A, BSpline (Cubic (Line ())), OnGrid ( )), xs), Interpolations . Throw ())
40
+ interp_full = extrapolate (scale (interpolate (A, BSpline (Cubic (Line (OnGrid ( ))))), xs), Throw ())
41
41
42
42
@test typeof (interp) == typeof (interp_full)
43
43
@test interp (XMIN) ≈ f (XMIN)
@@ -56,7 +56,7 @@ YLEN = convert(Integer, floor((YMAX - YMIN)/ΔY) + 1)
56
56
f (x) = log (x)
57
57
A = [f (x) for x in xs]
58
58
interp = LinearInterpolation (xs, A)
59
- interp_full = extrapolate (interpolate ((xs, ), A, Gridded (Linear ())), Interpolations . Throw ())
59
+ interp_full = extrapolate (interpolate ((xs, ), A, Gridded (Linear ())), Throw ())
60
60
61
61
@test typeof (interp) == typeof (interp_full)
62
62
@test interp (xmin) ≈ f (xmin)
@@ -76,8 +76,8 @@ YLEN = convert(Integer, floor((YMAX - YMIN)/ΔY) + 1)
76
76
x_lower = XMIN - ΔX
77
77
x_higher = XMAX + ΔX
78
78
79
- extrap = LinearInterpolation (xs, A, extrapolation_bc = Interpolations . Linear ())
80
- extrap_full = extrapolate (scale (interpolate (A, BSpline (Linear ()), OnGrid ()) , xs), Interpolations . Linear ())
79
+ extrap = LinearInterpolation (xs, A, extrapolation_bc = Line ())
80
+ extrap_full = extrapolate (scale (interpolate (A, BSpline (Linear ())) , xs), Line ())
81
81
82
82
@test typeof (extrap) == typeof (extrap_full)
83
83
@test extrap (x_lower) ≈ A[1 ] - ΔA_l
92
92
f (x, y) = log (x+ y)
93
93
A = [f (x,y) for x in xs, y in ys]
94
94
interp = LinearInterpolation ((xs, ys), A)
95
- interp_full = extrapolate (scale (interpolate (A, BSpline (Linear ()), OnGrid ()) , xs, ys), Interpolations . Throw ())
95
+ interp_full = extrapolate (scale (interpolate (A, BSpline (Linear ())) , xs, ys), Throw ())
96
96
97
97
@test typeof (interp) == typeof (interp_full)
98
98
@test interp (XMIN,YMIN) ≈ f (XMIN,YMIN)
115
115
f (x, y) = log (x+ y)
116
116
A = [f (x,y) for x in xs, y in ys]
117
117
interp = CubicSplineInterpolation ((xs, ys), A)
118
- interp_full = extrapolate (scale (interpolate (A, BSpline (Cubic (Line ())), OnGrid ( )), xs, ys), Interpolations . Throw ())
118
+ interp_full = extrapolate (scale (interpolate (A, BSpline (Cubic (Line (OnGrid ( ))))), xs, ys), Throw ())
119
119
120
120
@test typeof (interp) == typeof (interp_full)
121
121
@test interp (XMIN,YMIN) ≈ f (XMIN,YMIN)
142
142
f (x, y) = log (x+ y)
143
143
A = [f (x,y) for x in xs, y in ys]
144
144
interp = LinearInterpolation ((xs, ys), A)
145
- interp_full = extrapolate (interpolate ((xs, ys), A, Gridded (Linear ())), Interpolations . Throw ())
145
+ interp_full = extrapolate (interpolate ((xs, ys), A, Gridded (Linear ())), Throw ())
146
146
147
147
@test typeof (interp) == typeof (interp_full)
148
148
@test interp (xmin,ymin) ≈ f (xmin,ymin)
171
171
y_lower = YMIN - ΔY
172
172
y_higher = YMAX + ΔY
173
173
174
- extrap = LinearInterpolation ((xs, ys), A, extrapolation_bc = (Interpolations . Linear (), Interpolations . Flat ()))
175
- extrap_full = extrapolate (scale (interpolate (A, BSpline (Linear ()), OnGrid ()) , xs, ys), (Interpolations . Linear (), Interpolations . Flat ()))
174
+ extrap = LinearInterpolation ((xs, ys), A, extrapolation_bc = (Line (), Flat ()))
175
+ extrap_full = extrapolate (scale (interpolate (A, BSpline (Linear ())) , xs, ys), (Line (), Flat ()))
176
176
177
177
@test typeof (extrap) == typeof (extrap_full)
178
178
@test extrap (x_lower, y_lower) ≈ A[1 , 1 ] - ΔA_l
0 commit comments