Array API compatible wrapper for :py:func:`np.negative `. See its docstring for more information.
(x: Array, /)
| 576 | |
| 577 | |
| 578 | def negative(x: Array, /) -> Array: |
| 579 | """ |
| 580 | Array API compatible wrapper for :py:func:`np.negative <numpy.negative>`. |
| 581 | |
| 582 | See its docstring for more information. |
| 583 | """ |
| 584 | if x.dtype not in _numeric_dtypes: |
| 585 | raise TypeError("Only numeric dtypes are allowed in negative") |
| 586 | return Array._new(np.negative(x._array)) |
| 587 | |
| 588 | |
| 589 | def not_equal(x1: Array, x2: Array, /) -> Array: |