Filter array of CartesianIndex based on x-value

julia> v1 = [x for x in temp if x.I[1]==1]
5-element Array{CartesianIndex{2},1}:
 CartesianIndex(1, 5)
 CartesianIndex(1, 7)
 CartesianIndex(1, 8)
 CartesianIndex(1, 10)
 CartesianIndex(1, 13)

or

julia> v1 = filter(x->x.I[1]==1, temp)
5-element Array{CartesianIndex{2},1}:
 CartesianIndex(1, 5)
 CartesianIndex(1, 7)
 CartesianIndex(1, 8)
 CartesianIndex(1, 10)
 CartesianIndex(1, 13)
1 Like