dpnp.bitwise_and
- dpnp.bitwise_and(x1, x2, dtype=None, out=None, where=True, **kwargs)[source]
Compute the bit-wise AND of two arrays element-wise.
For full documentation refer to
numpy.bitwise_and.Limitations
Parameters
x1andx2are supported as eitherdpnp.ndarrayor scalar. Parametersdtype,outandwhereare supported with their default values. Sizes, shapes and data types of input arrays are supported to be equal. Keyword argumentskwargsare currently unsupported. Otherwise the function will be executed sequentially on CPU. Input data is supported as integer only.See also
dpnp.logical_andCompute the truth value of
x1ANDx2element-wise.dpnp.bitwise_orCompute the bit-wise OR of two arrays element-wise.
dpnp.bitwise_xorCompute the bit-wise XOR of two arrays element-wise.
Examples
>>> import dpnp as np >>> x1 = np.array([2, 5, 255]) >>> x2 = np.array([3,14,16]) >>> out = np.bitwise_and(x1, x2) >>> [i for i in out] [2, 4, 16]