Array API compatible wrapper for :py:func:`np.equal `. See its docstring for more information.
(x1: Array, x2: Array, /)
| 289 | |
| 290 | |
| 291 | def equal(x1: Array, x2: Array, /) -> Array: |
| 292 | """ |
| 293 | Array API compatible wrapper for :py:func:`np.equal <numpy.equal>`. |
| 294 | |
| 295 | See its docstring for more information. |
| 296 | """ |
| 297 | # Call result type here just to raise on disallowed type combinations |
| 298 | _result_type(x1.dtype, x2.dtype) |
| 299 | x1, x2 = Array._normalize_two_args(x1, x2) |
| 300 | return Array._new(np.equal(x1._array, x2._array)) |
| 301 | |
| 302 | |
| 303 | def exp(x: Array, /) -> Array: |