From a837b3dfe3bee01b1e9784d40f4f607617b73d69 Mon Sep 17 00:00:00 2001 From: Ashutosh Bharambe Date: Thu, 3 Oct 2024 13:33:09 +0000 Subject: [PATCH] fix(LinearInterpolation): index into last dimension to give suitable output --- src/parameter_caches.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parameter_caches.jl b/src/parameter_caches.jl index 824b2e2a..42d040e8 100644 --- a/src/parameter_caches.jl +++ b/src/parameter_caches.jl @@ -22,7 +22,7 @@ function linear_interpolation_parameters(u::AbstractArray{T, N}, t, idx) where { Δu = if N > 1 ax = axes(u) safe_diff.( - u[ax[1:(end - 1)]..., (idx + 1):(idx + 1)], u[ax[1:(end - 1)]..., idx:idx]) + u[ax[1:(end - 1)]..., (idx + 1)], u[ax[1:(end - 1)]..., idx]) else safe_diff(u[idx + 1], u[idx]) end