weight_sort: if nothing is passed to weight_sort return empty array