Continuing the discussion from Reinterpret 3D array into array of SMatrices:
I asked a similar question before, but the solution doesn’t work any longer. I used to be able to do this but now it throws an error that I don’t understand:
using StaticArrays
A = rand(2,3,5);
reinterpret(SMatrix{2,3,Float64},A,(5,),2*3)
ERROR: MethodError: no method matching reinterpret(::Type{StaticArrays.SArray{Tuple{2,3},Float64,2,L} where L}, ::Array{Float64,3}, ::Tuple{Int64}, ::Int64)
Closest candidates are:
reinterpret(::Type{T}, ::Array{S,N} where N, ::Tuple{Vararg{Int64,N}}) where {N, S, T} at array.jl:155
reinterpret(::Type{T}, ::Array{S,N} where N) where {S, T} at array.jl:148
reinterpret(::Type{T}, ::Base.ReshapedArray, ::Tuple{Vararg{Int64,N}} where N) where T at reshapedarray.jl:171
...
any ideas?
thanks!