### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Set routines »

# numpy.intersect1d

`numpy.``intersect1d`(ar1, ar2)

  Intersection returning repeated or unique elements common to both arrays.

  Parameters: | ar1,ar2 : array_like Input arrays.
  Returns: | out : ndarray, shape(N,) Sorted 1D array of common elements with repeating elements.

  See also

  `intersect1d_nu`
    Returns only unique common elements.
  `numpy.lib.arraysetops`
    Module with a number of other functions for performing set operations on arrays.

  Examples

      >>> np.intersect1d([1,3,3],[3,1,1])
      array([1, 1, 3, 3])

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Set routines »