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 x1 and x2 are supported as either dpnp.ndarray or scalar. Parameters dtype, out and where are supported with their default values. Sizes, shapes and data types of input arrays are supported to be equal. Keyword arguments kwargs are currently unsupported. Otherwise the function will be executed sequentially on CPU. Input data is supported as integer only.

See also

dpnp.logical_and

Compute the truth value of x1 AND x2 element-wise.

dpnp.bitwise_or

Compute the bit-wise OR of two arrays element-wise.

dpnp.bitwise_xor

Compute 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]