dpnp.equal
- dpnp.equal(x1, x2)[source]
Return (x1 == x2) element-wise.
For full documentation refer to
numpy.equal.Limitations
Parameter
x1is supported asdpnp.ndarray. Parameterx2is supported as eitherdpnp.ndarrayor int. Input array data types are limited by supported DPNP Data types. Sizes, shapes and data types of input arraysx1andx2are supported to be equal.See also
dpnp.not_equalReturn (x1 != x2) element-wise.
dpnp.greater_equalReturn the truth value of (x1 >= x2) element-wise.
dpnp.less_equalReturn the truth value of (x1 =< x2) element-wise.
dpnp.greaterReturn the truth value of (x1 > x2) element-wise.
dpnp.lessReturn 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]