add a dimensionalty check
This commit is contained in:
parent
1be0b76940
commit
3b082f88d1
@ -72,8 +72,11 @@ function surface_to_vecs(x::AVec, y::AVec, s::Union{AMat,Surface})
|
|||||||
yn = Vector{eltype(y)}(undef, length(a))
|
yn = Vector{eltype(y)}(undef, length(a))
|
||||||
zn = Vector{eltype(s)}(undef, length(a))
|
zn = Vector{eltype(s)}(undef, length(a))
|
||||||
for (n, (i, j)) in enumerate(Tuple.(CartesianIndices(a)))
|
for (n, (i, j)) in enumerate(Tuple.(CartesianIndices(a)))
|
||||||
xn[n] = x[i]
|
if length(x) == size(s)[1]
|
||||||
yn[n] = y[j]
|
i, j = j, i
|
||||||
|
end
|
||||||
|
xn[n] = x[j]
|
||||||
|
yn[n] = y[i]
|
||||||
zn[n] = a[i, j]
|
zn[n] = a[i, j]
|
||||||
end
|
end
|
||||||
return xn, yn, zn
|
return xn, yn, zn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user