I want to do matrix inversion on a stack of matrices, based on this post. I’m having difficulty recasting the arrays though. In my case, the array will come as data or an input to a function, but here is a minimal example of what I’m trying to do ( fill something like the GMat array with the data from A)

using StaticArrays
A = rand(3,3,5,10)
GMat = Array{SMatrix{3,3,Float64,9}}(undef, 5,10)
reinterpret(Array{SMatrix{3,3,Float64}},A)

How would I do this conversion? Sorry for a very simple question.