Er, that may sound silly, but why not using numpy.unique ? 1. Transform your nx4 array into a n record array 2. use numpy.unique on the record array 3. revert to a nx4 array. For example: z=np.array([[1,1],[1,2],[1,2],[1,3]]) zr=z.view([('a',int),('b',int)]) zs = numpy.unique(zr).view((int,2)) Am I missing something ?