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))
|
||||
zn = Vector{eltype(s)}(undef, length(a))
|
||||
for (n, (i, j)) in enumerate(Tuple.(CartesianIndices(a)))
|
||||
xn[n] = x[i]
|
||||
yn[n] = y[j]
|
||||
if length(x) == size(s)[1]
|
||||
i, j = j, i
|
||||
end
|
||||
xn[n] = x[j]
|
||||
yn[n] = y[i]
|
||||
zn[n] = a[i, j]
|
||||
end
|
||||
return xn, yn, zn
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user