Int vector to CarthesianIndex

I’m assuming you want the cartesian index to look like CartesianIndex(1,2,3,4,5). You can construct that with a tuple rather than a vector:

julia> CartesianIndex(Tuple(1:5))
CartesianIndex(1, 2, 3, 4, 5)
3 Likes