Answers for "np find unique"

3

python unique array of array numpy

>>> import numpy as np
>>> x = np.array([[1, 1], [2,3], [3,4]])
>>> np.unique(x)
array([1, 2, 3, 4])
Posted by: Guest on April-29-2021
0

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])
Posted by: Guest on August-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language