I have a multidimensional array something like this
[ [[]], [[1], [2]], [[1, 2]] ]
What's the best way to remove the empty array?
Right now I am just doing a array[1..-1] to remove the first element but I would like a more reliable way to do it.
[ [[],[1]], [[1],[2]] ]?ar.each_index.map{ |i| ar.combination(i).to_a[[],[1]]as an element? I'm just trying to clarify what your data really looks like.