Yeah it’s entirely non-obvious what the goal is. But if you mean some kind of “array destructuring” similar to how tuple destructuring works, then this should totally be possible but I haven’t seen an implementation of it yet. What already works is:
julia> (a,b,c,d) = [1 2 ; 3 4]
2Ă—2 Array{Int64,2}:
1 2
3 4
julia> a
1
julia> b
3
julia> c
2
julia> d
4
So all it’d take is some metaprogramming magic for a macro to flatten the left-hand side to a tuple in the same way that the right-hand side is flattened. (and maybe some shape checking)
Too bad I’m bad at this, but you could try it yourself: Metaprogramming · The Julia Language
where then I was interested only in the individual matrices (like xtrain, xvalidation, xtest…) rathen than in the whole matrix itself coming out from partition.
But I can stick with tuples, just having it in a matrix form would have been more elegant…