Python | numpy.isin() method Last Updated : 27 Sep, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of numpy.isin() method, we can see that one array having values are checked in a different numpy array having different elements with different sizes. Syntax : numpy.isin(target_array, list) Return : Return boolean array having same size as of target_array. Example #1 : In this example we can see that by using numpy.isin() method, we are able to get the boolean array if elements are matched with the target array. Python3 1=1 # import numpy import numpy as np # using numpy.isin() method gfg1 = np.array([1, 2, 3, 4, 5]) lis = [1, 3, 5] gfg = np.isin(gfg1, lis) print(gfg) Output : [ True False True False True] Example #2 : Python3 1=1 # import numpy import numpy as np # using numpy.isin() method gfg1 = np.array([[1, 3], [5, 7], [9, 11]]) lis = [1, 3, 11, 9] gfg = np.isin(gfg1, lis) print(gfg) Output : [[ True True] [False False] [ True True]] Comment More infoAdvertise with us Next Article Python | numpy.lookfor() method J jitender_1998 Follow Improve Article Tags : Python Python-numpy Practice Tags : python Similar Reads Python | numpy.isnat() method With the help of numpy.isnat() method, we can get the boolean value as true if date defined in a np.datetime64() method is not a time by using numpy.isnat() method. Syntax : numpy.isnat() Return : Return the boolean value if time is not found. Example #1 : In this example we can see that by using nu 1 min read Python | numpy.lookfor() method With the help of numpy.lookfor() method, we can get the information about the module in the numpy by using numpy.lookfor() method. Syntax : numpy.lookfor(module_name) Return : Return the information about the module. Example #1 : In this example we can see that by using numpy.lookfor() method, we ar 1 min read numpy.invert() in Python numpy.invert() is a bitwise function in NumPy used to invert each bit of an integer array. It performs a bitwise NOT operation, flipping 0s to 1s and 1s to 0s in the binary representation of integers. Example:Pythonimport numpy as np a = np.array([1, 2, 3]) res = np.invert(a) print(res)Output[-2 -3 2 min read numpy.isinf() in Python numpy.isinf() test element-wise whether a value is positive or negative infinity. It returns a Boolean array with True where the input is either +inf or -inf and False otherwise. Example:Pythonimport numpy as np a = np.array([1, np.inf, -np.inf, 0, np.nan]) res = np.isinf(a) print(res)Output[False T 2 min read numpy.isfinite() in Python The numpy.isfinite() function tests element-wise whether it is finite or not(not infinity or not Not a Number) and return the result as a boolean array. Syntax :Â numpy.isfinite(array [, out]) Parameters :Â array : [array_like]Input array or object whose elements, we need to test for infinity out : 2 min read Python | sympy.is_number method With the help of sympy.is_number method, we can check if element is number or not and it will return a boolean value if number is found by using sympy.is_number method. Syntax : sympy.is_number Return : Return a boolean value if number is found. Example #1 : In this example we can see that by using 1 min read Like