How do I reinterpret and reshape a multi-dimensional array `J` into a two-dimensional array `j` such that `typeof(j) <: Matrix` is true in Julia 0.7

Why not use

j = reshape(J, (4*10,12))
typeof(j) <: Matrix #Evaluates to true

There’s no need for reinterpret as the elements are going to be Float64 still.

Note that a reshaped array in Julia 0.7 is similar to a view, in that it shares its data with the original array.

5 Likes