Answers for "how to remove duplicates from numpy array"

3

remove duplicates function python

def remove_dupiclates(list_):
	new_list = []
	for a in list_:
    	if a not in new_list:
        	new_list.append(a)
	return new_list
Posted by: Guest on September-22-2020
0

numpy drop duplicates

import numpy as np
array = np.array([0,1,0])
print(np.unique(array))
>> [0 1]
Posted by: Guest on February-16-2022

Code answers related to "how to remove duplicates from numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language