Skip to content

Commit 8de752a

Browse files
committed
Format with JuliaFormatter v1
1 parent bfa3bff commit 8de752a

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

src/interpolation_caches.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,8 +1220,8 @@ function BSplineApprox(
12201220
end
12211221
for k in 2:(n - 1)
12221222
q[ax_u...,
1223-
k] = u[ax_u..., k] - sc[k, 1] * u[ax_u..., 1] -
1224-
sc[k, h] * u[ax_u..., end]
1223+
k] = u[ax_u..., k] - sc[k, 1] * u[ax_u..., 1] -
1224+
sc[k, h] * u[ax_u..., end]
12251225
end
12261226
Q = Array{T, N}(undef, size(u)[1:(end - 1)]..., h - 2)
12271227
for i in 2:(h - 1)

src/interpolation_utils.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ function cumulative_integral(A::AbstractInterpolation{<:Number}, cache_parameter
191191
Base.require_one_based_indexing(A.u)
192192
idxs = cache_parameters ? (1:(length(A.t) - 1)) : (1:0)
193193
return cumsum(_integral(A, idx, t1, t2)
194-
for (idx, t1, t2) in
195-
zip(idxs, @view(A.t[begin:(end - 1)]), @view(A.t[(begin + 1):end])))
194+
for (idx, t1, t2) in zip(idxs, @view(A.t[begin:(end - 1)]), @view(A.t[(begin + 1):end])))
196195
end
197196

198197
function get_parameters(A::LinearInterpolation, idx)

test/interpolation_tests.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,6 @@ end
10251025
ut1 = Float32[0.1, 0.2, 0.3, 0.4, 0.5]
10261026
ut2 = Float64[0.1, 0.2, 0.3, 0.4, 0.5]
10271027
for u in (ut1, ut2), t in (ut1, ut2)
1028-
10291028
interp = @inferred(LinearInterpolation(ut1, ut2))
10301029
for xs in (u, t)
10311030
ys = @inferred(interp(xs))
@@ -1108,7 +1107,6 @@ f_cubic_spline = c -> square(CubicSpline, c)
11081107
iszero_allocations(u, t) = iszero(@allocated(DataInterpolations.munge_data(u, t)))
11091108

11101109
for T in (String, Union{String, Missing}), dims in 1:3
1111-
11121110
_u0 = convert(Array{T}, reshape(u0, ntuple(i -> i == dims ? 3 : 1, dims)))
11131111

11141112
u, t = @inferred(DataInterpolations.munge_data(_u0, t0))
@@ -1137,20 +1135,20 @@ end
11371135
li = LinearInterpolation(x, t)
11381136

11391137
@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]))
11411139

11421140
xvals = rand(rng, 100)
11431141
@test Symbolics.substitute(ci(0.425), Dict(x => xvals)) == xvals[42]
11441142
@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])
11461144

11471145
@variables dx[1:100]
11481146
@test_nowarn chs = CubicHermiteSpline(dx, x, t)
11491147
@test_nowarn qi = QuadraticInterpolation(x, t)
11501148
@test_nowarn li = LagrangeInterpolation(x, t)
11511149
@test_nowarn cs = CubicSpline(x, t)
11521150

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)
11561154
end

0 commit comments

Comments
 (0)