Returns a new enumerable that contains only unique values.  The default
implementation returns an array regardless of the receiver type.

var arr = ["a", "a", "b", "b"];
arr.uniq(); => ["a", "b"]

@returns {Ember.Enumerable}
324374
function() {
    var ret = [];
    this.forEach(function(k){
      if (a_indexOf(ret, k)<0) ret.push(k);
    });
    return ret;
  }
631581
function unique( arr, sort, uniqueFn ){
	var rtn = [];

	if ( arr.length ){
		if ( sort ){
			// more efficient because I can presort
			if ( bmoor.isFunction(sort) ){
				arr = arr.slice(0).sort(sort);
			}

			let last;
			
			for( let i = 0, c = arr.length; i < c; i++ ){
				let d = arr[i],
					v = uniqueFn ? uniqueFn(d) : d;

				if ( v !== last ){
					last = v;
					rtn.push( d );
				}
			}
		}else if ( uniqueFn ){
			let hash = {};

			for( let i = 0, c = arr.length; i < c; i++ ){
				let d = arr[i],
					v = uniqueFn(d);

				if ( !hash[v] ){
					hash[v] = true;
					rtn.push( d );
				}
			}
		}else{
			// greedy and inefficient
			for( let i = 0, c = arr.length; i < c; i++ ){
			 	let d = arr[i];

			 	if ( rtn.indexOf(d) === -1 ){
			 		rtn.push( d );
			 	}
			}
		}
	}

	return rtn;
}
655461
function() {
            var returnType, list = [];
            for (var i = 0; i < arguments.length; i++) {
                var arg = arguments[i];
                if (isArray(arg.value)) {
                    returnType = returnType || arg.type;
                    arg = arg.value;
                }
                list = list.concat(arg);
            }

            return newLessList(list, returnType);
        }
520989
public SimpleListHolder<T> getUniqueFlatFull() {
        if (uniqueFull == null) {
            uniqueFull = newUniqueSimpleListHolder(all, getSortProperty());
        }
        return uniqueFull;
    }
741521
@SuppressWarnings("unchecked")
	public Iterable<Obj> asObjSeq(@Nullable Arr arr) {
		if (arr != null) {
			return (Iterable<Obj>)(Iterable<?>)arr;
		}
		return Collections.emptyIterable();
	}
1055495
function(){
    for( let i = 0; i < type.enums.length; i++ ){
      let en = type.enums[ i ];

      if( en === value ){
        return {
          name: name,
          value: value,
          strValue: '' + value,
          bypass: propIsBypass
        };
      }
    }

    return null;
  }
223911
public int[] getUniqueVariables() {
    Set<Integer> uniqueVars = Sets.newTreeSet(Ints.asList(semanticVariables));

    int[] uniqueVarsArray = new int[uniqueVars.size()];
    int i = 0;
    for (Integer uniqueVar : uniqueVars) {
      uniqueVarsArray[i] = uniqueVar;
      i++;
    }

    return uniqueVarsArray;
  }
729085
public static int[] unique(int[] arrays, int min, int max) {
        List<Integer> list = new ArrayList<>(arrays.length);
        for (int arr : arrays) {
            if (!list.contains(arr) && arr >= min && arr <= max) {
                list.add(arr);
            }
        }
        int[] res = new int[list.size()];
        int i = 0;
        for (int arr : list) {
            res[i++] = arr;
        }
        return res;
    }
31267
public static <E> E one(E[] array) {
        return new OneElement<E>().apply(new ArrayIterator<>(array));
    }
325657
public static String[] unique(String[] arrays) {
        List<String> list = new ArrayList<>(arrays.length);
        for (String arr : arrays) {
            if (!list.contains(arr)) {
                list.add(arr);
            }
        }
        String[] res = new String[list.size()];
        int i = 0;
        for (String arr : list) {
            res[i++] = arr;
        }
        return res;
    }
803429
function unique (elements) {
  for (var i = 0; i < elements.length - 1; i++) {
    for (var j = i + 1; j < elements.length; j++) {
      if (elements[i] === elements[j]) return false
    }
  }

  return true
}
1334274
function array_unique(l){
			var i=0,n=l.length,k={},a=[];
			while(i<n) {
				k[l[i]] || (k[l[i]] = 1 && a.push(l[i]));
				i++;
			}
			return a;
		}
410062
function() {
    var ret = Ember.A([]);
    this.forEach(function(o, idx) { ret[idx] = o; });
    return ret ;
  }
31121
private List<T> makeUnmodifiableUniqueList() {
        Set<T> tmp = newHashSet();
        List<T> uniques = newArrayList();
        for (T t : getIterable()) {
            if (tmp.add(t)) {
                uniques.add(t);
            }
        }

        sort(uniques);
        return unmodifiableList(uniques);
    }
370891
def unique_array(arr):
    
    if not len(arr):
        return np.asarray(arr)
    elif pd:
        if isinstance(arr, np.ndarray) and arr.dtype.kind not in 'MO':
            # Avoid expensive unpacking if not potentially datetime
            return pd.unique(arr)

        values = []
        for v in arr:
            if (isinstance(v, datetime_types) and
                not isinstance(v, cftime_types)):
                v = pd.Timestamp(v).to_datetime64()
            values.append(v)
        return pd.unique(values)
    else:
        arr = np.asarray(arr)
        _, uniq_inds = np.unique(arr, return_index=True)
        return arr[np.sort(uniq_inds)]
1026226
def get_not_unique_values(array):
    '''
    '''
    s = np.sort(array, axis=None)
    s = s[s[1:] == s[:-1]]
    return np.unique(s)
1012675
function uniqueArray(src, key, sort) {
    var results = [];
    var values = [];
    var i = 0;

    while (i < src.length) {
        var val = key ? src[i][key] : src[i];
        if (inArray(values, val) < 0) {
            results.push(src[i]);
        }
        values[i] = val;
        i++;
    }

    if (sort) {
        if (!key) {
            results = results.sort();
        } else {
            results = results.sort(function sortUniqueArray(a, b) {
                return a[key] > b[key];
            });
        }
    }

    return results;
}