I hadn’t paid enough attention to the specific request.
By modifying the @DNF solution in a “dirty” way, maybe you get the desired result (I have not done many tests)
cat(A, B ; dims=1+!isempty(A)*2)
I hadn’t paid enough attention to the specific request.
By modifying the @DNF solution in a “dirty” way, maybe you get the desired result (I have not done many tests)
cat(A, B ; dims=1+!isempty(A)*2)