NumPy
numpy.org › doc › stable › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.5 Manual
>>> import numpy as np >>> np.intersect1d([1, 3, 4, 3], [3, 1, 2, 1]) array([1, 3])
NumPy
numpy.org › devdocs › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.6.dev0 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]# Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters: ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
NumPy
numpy.org › doc › 2.2 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.2 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]# Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters: ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
NumPy
numpy.org › doc › 2.3 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.3 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]# Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters: ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
NumPy
numpy.org › doc › 1.13 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.13 Manual
June 10, 2017 - numpy.intersect1d(ar1, ar2, assume_unique=False)[source]¶ · Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. See also · numpy.lib.arraysetops · Module with a number of other functions for performing set operations on arrays.
NumPy
numpy.org › doc › 2.0 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.0 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]# Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters: ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
Educative
educative.io › answers › what-is-the-numpyintersect1d-function-in-python
What is the numpy.intersect1d() function in Python?
NumPy is a popular library for working with arrays. NumPy’s intersect1d() function returns the intersection between two arrays.
Studyopedia
studyopedia.com › home › intersection of numpy arrays
Intersection of Numpy Arrays - Studyopedia
March 30, 2026 - import numpy as np # Create two arrays n1 = np.array([10, 20, 30, 40, 50]) n2 = np.array([60, 70, 80, 90, 100]) print("Iterating array1...") for a in n1: print(a) print("\nIterating array2...") for a in n2: print(a) # Find the intersection resarr = np.intersect1d(n1, n2) print("\nIntersection (different elements) = \n", resarr)
NumPy
numpy.org › doc › 1.22 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.22 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]¶ · Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters · ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
NumPy
numpy.org › doc › 1.18 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.18 Manual
May 24, 2020 - numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]¶ · Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters · ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
Pydocs
pydocs.github.io › p › numpy › 1.22.4 › api › numpy.intersect1d.html
intersect1d
numpy 1.22.4 Pypi GitHub Homepage · Other Docs · ParametersReturnsBackRef intersect1d(ar1, ar2, assume_unique=False, return_indices=False) Return the sorted, unique values that are in both of the input arrays. ar1, ar2 : array_like · Input arrays. Will be flattened if not already 1D.
University of Texas at Austin
het.as.utexas.edu › HET › Software › Numpy › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.9 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False)[source]¶ · Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. See also · numpy.lib.arraysetops · Module with a number of other functions for performing set operations on arrays.
SciPy
docs.scipy.org › doc › numpy-1.10.0 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.10 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False)[source]¶ · Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. See also · numpy.lib.arraysetops · Module with a number of other functions for performing set operations on arrays.
NumPy
numpy.org › doc › 1.25 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.25 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]# Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters: ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.1 Manual
numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False)[source]# Find the intersection of two arrays. Return the sorted, unique values that are in both of the input arrays. Parameters: ar1, ar2array_like · Input arrays. Will be flattened if not already 1D.
NumPy
numpy.org › doc › 2.1 › reference › generated › numpy.ma.intersect1d.html
numpy.ma.intersect1d — NumPy v2.1 Manual
>>> import numpy as np >>> x = np.ma.array([1, 3, 3, 3], mask=[0, 0, 0, 1]) >>> y = np.ma.array([3, 1, 1, 1], mask=[0, 0, 0, 1]) >>> np.ma.intersect1d(x, y) masked_array(data=[1, 3, --], mask=[False, False, True], fill_value=999999)