Array API compatible wrapper for :py:func:`np.logical_xor `. See its docstring for more information.
(x1: Array, x2: Array, /)
| 548 | |
| 549 | |
| 550 | def logical_xor(x1: Array, x2: Array, /) -> Array: |
| 551 | """ |
| 552 | Array API compatible wrapper for :py:func:`np.logical_xor <numpy.logical_xor>`. |
| 553 | |
| 554 | See its docstring for more information. |
| 555 | """ |
| 556 | if x1.dtype not in _boolean_dtypes or x2.dtype not in _boolean_dtypes: |
| 557 | raise TypeError("Only boolean dtypes are allowed in logical_xor") |
| 558 | # Call result type here just to raise on disallowed type combinations |
| 559 | _result_type(x1.dtype, x2.dtype) |
| 560 | x1, x2 = Array._normalize_two_args(x1, x2) |
| 561 | return Array._new(np.logical_xor(x1._array, x2._array)) |
| 562 | |
| 563 | |
| 564 | def multiply(x1: Array, x2: Array, /) -> Array: |
nothing calls this directly
no test coverage detected