From c26bd4b256c2ff9fc4c6b726af4974d4d112f280 Mon Sep 17 00:00:00 2001 From: Pablo Villacorta Aylagas Date: Thu, 27 Jun 2024 22:46:59 +0200 Subject: [PATCH] Back to `copyto!` --- KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl b/KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl index 62034faa9..5191c8b43 100644 --- a/KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl +++ b/KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl @@ -103,8 +103,8 @@ end function interpolate(motion::ArbitraryMotion{T}, Ns::Val) where {T<:Real} Ns, Nt = size(motion.dx) - id = similar(motion.dx, Ns); id .= range(oneunit(T), T(Ns), Ns) - t = similar(motion.dx, Nt); t .= range(zero(T), oneunit(T), Nt) + id = similar(motion.dx, Ns); copyto!(id, collect(range(oneunit(T), T(Ns), Ns))) + t = similar(motion.dx, Nt); copyto!(t, collect(range(zero(T), oneunit(T), Nt))) itpx = GriddedInterpolation((id, t), motion.dx, Gridded(Linear())) itpy = GriddedInterpolation((id, t), motion.dy, Gridded(Linear())) itpz = GriddedInterpolation((id, t), motion.dz, Gridded(Linear()))