Skip to content

Commit

Permalink
Back to copyto!
Browse files Browse the repository at this point in the history
  • Loading branch information
pvillacorta committed Jun 27, 2024
1 parent 4eaac2a commit c26bd4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions KomaMRIBase/src/datatypes/phantom/motion/ArbitraryMotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit c26bd4b

Please sign in to comment.