Union() - Remove duplicates for multi-dimensional array

Hello,

Could you please help me to extend the union() for a multidimensional array? Remove duplicate if all the cols match.

Eg : [[0.0, 0.0, 150.0, 300.0, 350.0], [1040.0, 1040.0, 1040.0, 1040.0, 1020.0]] —> [[0.0, 150.0, 300.0, 350.0], [1040.0, 1040.0, 1040.0, 1020.0]]

Thank!