### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Logic functions »

# numpy.equal

`numpy.``equal`(x1, x2[, out])

  Return (x1 == x2) element-wise.

  Parameters : | x1, x2 : array_like Input arrays of the same shape.
  Returns : | out : {ndarray, bool} Output array of bools, or a single bool if x1 and x2 are scalars.

  See also

  `not_equal`, `greater_equal`, `less_equal`, `greater`, `less`

  Examples

      >>> np.equal([0, 1, 3], np.arange(3))
      array([ True,  True, False], dtype=bool)

  What is compared are values, not types. So an int (1) and an array of length one can evaluate as True:

      >>> np.equal(1, np.ones(1))
      array([ True], dtype=bool)

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Logic functions »