Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to find unique values in numpy array

>>> np.unique([1, 1, 2, 2, 3, 3])
array([1, 2, 3])
>>> a = np.array([[1, 1], [2, 3]])
>>> np.unique(a)
array([1, 2, 3])
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #find #unique #values #numpy #array
ADD COMMENT
Topic
Name
4+9 =