; docformat = 'rst' ;+ ; Returns the complement of an index array. ; ; :Returns: ; lonarr or -1L if complement is empty ; ; :Params: ; indices : in, required, type=lonarr ; indices to complement ; n : in, required, type=integer type ; number of elements in full array ; ; :Keywords: ; count : out, optional, type=long ; number of elements in the complement ;- function mg_complement, indices, n, count=ncomplement compile_opt strictarr all = bytarr(n) all[indices] = 1B return, where(all eq 0B, ncomplement) end