dpnp.equal
- dpnp.equal(x1, x2)[source]
Return (x1 == x2) element-wise.
For full documentation refer to
numpy.equal
.Limitations
Parameter
x1
is supported asdpnp.ndarray
. Parameterx2
is supported as eitherdpnp.ndarray
or int. Input array data types are limited by supported DPNP Data types. Sizes, shapes and data types of input arraysx1
andx2
are supported to be equal.See also
dpnp.not_equal
Return (x1 != x2) element-wise.
dpnp.greater_equal
Return the truth value of (x1 >= x2) element-wise.
dpnp.less_equal
Return the truth value of (x1 =< x2) element-wise.
dpnp.greater
Return the truth value of (x1 > x2) element-wise.
dpnp.less
Return the truth value of (x1 < x2) element-wise.
Examples
>>> import dpnp as np >>> x1 = np.array([0, 1, 3]) >>> x2 = np.arange(3) >>> out = np.equal(x1, x2) >>> [i for i in out] [True, True, False]