Getting the index of nan values from where condition and passing it to original array but it is returning empty
#Input
url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
iris_2d = np.genfromtxt(url, delimiter = ',', dtype = 'float')# random number from 0 to 150 as high is none
iris_2d[np.random.randint(150, size = 20), np.random.randint(4, size = 20)] = np.nan
( iris_2d[np.where(iris_2d[a,b]==np.nan)])
nan!=nanwhich is why your code does not work.