Numpy isnan() is an inbuilt Numpy function that is used to test if the element is NaN(not a number) or not. The isnan() function contains two parameters, out of which one is optional. We can pass the arrays also to check whether the items present in the array belong to NaN class or not. If it is NaN, the method returns True otherwise False. So, the isnan() function returns Boolean values.
Python numpy.isnan() function tests element-wise, whether it is NaN or not, return the result as a boolean array. The isnan() function is defined under numpy, which can be imported as import numpy as np, and we can create the multidimensional arrays and derive other mathematical statistics.
numpy.isnan(input array or the scalar value, out(output array))
#numpy #python