Rubi nos trilhos do colapso da matriz

your_array.flatten(level)
Nimorum