NumPy
numpy.org › doc › stable › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v2.5 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.
Linear algebra
The NumPy linear algebra functions rely on BLAS and LAPACK to provide efficient low level implementations of standard linear algebra algorithms. Those libraries may be provided by NumPy itself using C versions of a subset of their reference implementations but, when possible, highly optimized ...
numpy.unique
Find the unique elements of an array · Returns the sorted unique elements of an array. There are three optional outputs in addition to the unique elements:
Array creation routines
empty(shape[, dtype, order, device, like]) · Return a new array of given shape and type, without initializing entries
Array manipulation routines
copyto(dst, src[, casting, where]) · Copies values from one array to another, broadcasting as necessary
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 › 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.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 › 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)
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.
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.
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.
Pydocs
pydocs.github.io › p › numpy › 1.22.4 › api › numpy.intersect1d.html
intersect1d
intersect1d : ndarray · Sorted 1D array of common and unique elements. comm1 : ndarray · The indices of the first occurrences of the common values in :None:None:`ar1`. Only provided if :None:None:`return_indices` is True. comm2 : ndarray · The indices of the first occurrences of the common ...
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 › 1.14 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.14 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 › 2.0 › reference › generated › numpy.ma.intersect1d.html
numpy.ma.intersect1d — NumPy v2.0 Manual
>>> 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)
TutorialsPoint
tutorialspoint.com › numpy › numpy_intersection.htm
NumPy - Intersection
In NumPy, the intersect1d() function is used to find the intersection of two 1-dimensional arrays, or even more arrays if necessary.
SciPy
docs.scipy.org › doc › numpy-1.12.0 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.12 Manual
January 16, 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.
Studyopedia
studyopedia.com › home › intersection of numpy arrays
Intersection of Numpy Arrays - Studyopedia
March 30, 2026 - If you want to get the intersection of two arrays, use the intersect1d() method in Numpy. Intersection means finding common elements between two arrays.
NumPy
numpy.org › doc › 1.16 › reference › generated › numpy.intersect1d.html
numpy.intersect1d — NumPy v1.16 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. See also · numpy.lib.arraysetops · Module with a number of other functions for performing set operations ...
JAX Documentation
docs.jax.dev › en › latest › _autosummary › jax.numpy.intersect1d.html
jax.numpy.intersect1d — JAX documentation
jax.numpy.intersect1d(ar1, ar2, assume_unique=False, return_indices=False, *, size=None, fill_value=None)[source]#
SciPy
docs.scipy.org › doc › numpy-1.13.0 › 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.
TutorialsPoint
tutorialspoint.com › numpy › numpy_intersect1d_function.htm
Numpy intersect1d() Function
The Numpy intersect1d() function finds the intersection of two arrays. It return's a sorted array of unique elements that are present in both input arrays. This function is useful for identifying common elements between arrays, whether they contain