Skip to content

Commit

Permalink
Merge pull request #28 from tknopp/patch-1
Browse files Browse the repository at this point in the history
Fix 1D case in set_points!
  • Loading branch information
jipolanco authored Sep 14, 2024
2 parents 77d4b33 + 5625ec9 commit 319e2b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/set_points.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ end
function set_points!(p::PlanNUFFT, xp::AbstractMatrix{T}; kwargs...) where {T}
N = ndims(p)
size(xp, 1) == N || throw(DimensionMismatch(lazy"expected input matrix to have dimensions ($N, Np)"))
xp_vec = reinterpret(reshape, NTuple{N, T}, xp) :: AbstractVector # TODO: performance of reinterpret?
if N == 1
xp_vec = vec(xp)
else
xp_vec = reinterpret(reshape, NTuple{N, T}, xp) :: AbstractVector # TODO: performance of reinterpret?
end
set_points!(p, xp_vec; kwargs...)
end

0 comments on commit 319e2b6

Please sign in to comment.