numpy.equal(x1,x2,/,out=None,*,where=True,casting='same_kind',order='K',dtype=None,subok=True[,signature,extobj]) = <ufunc 'equal'>¶Return (x1 == x2) element-wise.
| Parameters: | x1, x2 : array_like
out : ndarray, None, or tuple of ndarray and None, optional
where : array_like, optional
**kwargs
|
|---|---|
| Returns: | out : ndarray or bool
|
See also
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 oflength one can evaluate as True:
>>>np.equal(1,np.ones(1))array([ True], dtype=bool)