Answers for "number of unique values in a numpy array"

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 convert array of arrays into single array with unique values in numpy

>>> array = np.zeros((10,12,42,53))
>>> list(set(array.flat))
[0.0]
Posted by: Guest on June-07-2020

Code answers related to "number of unique values in a numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language