org = np.array([
[1,2,3,4,5],
[0,1,2,9,8],
[1,4,9,8,5],
[1,2,3,4,5],
[0,1,2,9,8]])
#displaying the original array
print("Original Array : ")
print(org,"\n")
def remove_dupl_arrays(array:np.array,tol:float)->np.array:
"""removes an array without the duplicates from a list of list, given the tolerance tol"""
new = np.lexsort(org.T) #pssing transpose of org array to lexsort()
new01 = org[new,:] #ordered org
ind_double = np.concatenate(([True], np.linalg.norm(np.diff(new01, axis=0),axis=1)<tol))
return np.array(new01[ind_double])
#displaying the new array with updated/unique elements
print("Result Array : ")
print(remove_dupl_arrays(org,1e-5))