Array API compatible wrapper for :py:func:`np.bitwise_xor `. See its docstring for more information.
(x1: Array, x2: Array, /)
| 211 | |
| 212 | |
| 213 | def bitwise_xor(x1: Array, x2: Array, /) -> Array: |
| 214 | """ |
| 215 | Array API compatible wrapper for :py:func:`np.bitwise_xor <numpy.bitwise_xor>`. |
| 216 | |
| 217 | See its docstring for more information. |
| 218 | """ |
| 219 | if ( |
| 220 | x1.dtype not in _integer_or_boolean_dtypes |
| 221 | or x2.dtype not in _integer_or_boolean_dtypes |
| 222 | ): |
| 223 | raise TypeError("Only integer or boolean dtypes are allowed in bitwise_xor") |
| 224 | # Call result type here just to raise on disallowed type combinations |
| 225 | _result_type(x1.dtype, x2.dtype) |
| 226 | x1, x2 = Array._normalize_two_args(x1, x2) |
| 227 | return Array._new(np.bitwise_xor(x1._array, x2._array)) |
| 228 | |
| 229 | |
| 230 | def ceil(x: Array, /) -> Array: |
no test coverage detected