I think you should use sacollect() to collect a StaticArray from a generator - see doc here:
using StaticArrays: sacollect
...
sacollect(SVector{9, Int}, I1[i] for i in 1:3 for j in 1:3)
I think you should use sacollect() to collect a StaticArray from a generator - see doc here:
using StaticArrays: sacollect
...
sacollect(SVector{9, Int}, I1[i] for i in 1:3 for j in 1:3)