Answers for "python array unique value"

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
11

python list with only unique values

my_list = list(set(my_list))
Posted by: Guest on May-05-2020

Python Answers by Framework

Browse Popular Code Answers by Language