@@ -1025,7 +1025,6 @@ end
1025
1025
ut1 = Float32[0.1 , 0.2 , 0.3 , 0.4 , 0.5 ]
1026
1026
ut2 = Float64[0.1 , 0.2 , 0.3 , 0.4 , 0.5 ]
1027
1027
for u in (ut1, ut2), t in (ut1, ut2)
1028
-
1029
1028
interp = @inferred (LinearInterpolation (ut1, ut2))
1030
1029
for xs in (u, t)
1031
1030
ys = @inferred (interp (xs))
@@ -1108,7 +1107,6 @@ f_cubic_spline = c -> square(CubicSpline, c)
1108
1107
iszero_allocations (u, t) = iszero (@allocated (DataInterpolations. munge_data (u, t)))
1109
1108
1110
1109
for T in (String, Union{String, Missing}), dims in 1 : 3
1111
-
1112
1110
_u0 = convert (Array{T}, reshape (u0, ntuple (i -> i == dims ? 3 : 1 , dims)))
1113
1111
1114
1112
u, t = @inferred (DataInterpolations. munge_data (_u0, t0))
@@ -1137,20 +1135,20 @@ end
1137
1135
li = LinearInterpolation (x, t)
1138
1136
1139
1137
@test isequal (ci (0.425 ), x[42 ])
1140
- @test isequal (li (0.425 ), x[42 ] + 0.5 * (x[43 ] - x[42 ]))
1138
+ @test isequal (li (0.425 ), x[42 ] + 0.5 * (x[43 ] - x[42 ]))
1141
1139
1142
1140
xvals = rand (rng, 100 )
1143
1141
@test Symbolics. substitute (ci (0.425 ), Dict (x => xvals)) == xvals[42 ]
1144
1142
@test Symbolics. substitute (li (0.425 ), Dict (x => xvals)) ==
1145
- xvals[42 ] + 0.5 * (xvals[43 ] - xvals[42 ])
1143
+ xvals[42 ] + 0.5 * (xvals[43 ] - xvals[42 ])
1146
1144
1147
1145
@variables dx[1 : 100 ]
1148
1146
@test_nowarn chs = CubicHermiteSpline (dx, x, t)
1149
1147
@test_nowarn qi = QuadraticInterpolation (x, t)
1150
1148
@test_nowarn li = LagrangeInterpolation (x, t)
1151
1149
@test_nowarn cs = CubicSpline (x, t)
1152
1150
1153
- @test_throws Exception ai = AkimaInterpolation (x, t)
1154
- @test_throws Exception bsi = BSplineInterpolation (x, t, 3 , :ArcLen , :Average )
1155
- @test_throws Exception pc = PCHIPInterpolation (x, t)
1151
+ @test_throws Exception ai= AkimaInterpolation (x, t)
1152
+ @test_throws Exception bsi= BSplineInterpolation (x, t, 3 , :ArcLen , :Average )
1153
+ @test_throws Exception pc= PCHIPInterpolation (x, t)
1156
1154
end
0 commit comments