Find common values between two NumPy arrays Last Updated : 29 Aug, 2020 Comments Improve Suggest changes Like Article Like Report In NumPy, we can find common values between two arrays with the help intersect1d(). It will take parameter two arrays and it will return an array in which all the common elements will appear. Syntax: numpy.intersect1d(array1,array2) Parameter :Two arrays. Return :An array in which all the common element will appear. Example 1: Python import numpy as np ar1 = np.array([0, 1, 2, 3, 4]) ar2 = [1, 3, 4] # Common values between two arrays print(np.intersect1d(ar1, ar2)) Output: [1,3,4] Example 2: Python import numpy as np ar1 = np.array([12, 14, 15, 16, 17]) ar2 = [2, 4, 5, 6, 7, 8, 9, 12] # Common values between two arrays print(np.intersect1d(ar1, ar2)) Output: [12] Comment More infoAdvertise with us Next Article Find common values between two NumPy arrays V vipinyadav15799 Follow Improve Article Tags : Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads Calculate average values of two given NumPy arrays Finding average of NumPy arrays is quite similar to finding average of given numbers. We just have to get the sum of corresponding array elements and then divide that sum with the total number of arrays. Let's see an example: Example 1: Calculate average values of two given NumPy 1d-arrays Python3 # 1 min read How to find the Index of value in Numpy Array ? In this article, we are going to find the index of the elements present in a Numpy array.Using where() Methodwhere() method is used to specify the index of a particular element specified in the condition.Syntax: numpy.where(condition[, x, y])Example 1: Get index positions of a given valueHere, we fi 5 min read How to remove NaN values from a given NumPy array? In this article, we are going to learn how to remove Nan values from a given array. Nan values are those values that do not have a specific value associated with them or they are different from the type of values that are to be used in the declared array. There are basically three approaches with sl 3 min read How to Change a Single Value in a NumPy Array NumPy arrays are a fundamental data structure in Python, widely used for scientific computing and data analysis. They offer a powerful way to perform operations on large datasets efficiently. One common task when working with NumPy arrays is changing a single value within the array. This article wil 6 min read How to get values of an NumPy array at certain index positions? Sometimes we need to remove values from the source Numpy array and add them at specific indices in the target array. In NumPy, we have this flexibility, we can remove values from one array and add them to another array. We can perform this operation using numpy.put() function and it can be applied t 4 min read Like