The description of jQuery.unique() states:
Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays
I know unique works with DOM but this WORKS on arrays of int:
$.unique(arr.sort());