Array API compatible wrapper for :py:func:`np.remainder `. See its docstring for more information.
(x1: Array, x2: Array, /)
| 636 | |
| 637 | |
| 638 | def remainder(x1: Array, x2: Array, /) -> Array: |
| 639 | """ |
| 640 | Array API compatible wrapper for :py:func:`np.remainder <numpy.remainder>`. |
| 641 | |
| 642 | See its docstring for more information. |
| 643 | """ |
| 644 | if x1.dtype not in _real_numeric_dtypes or x2.dtype not in _real_numeric_dtypes: |
| 645 | raise TypeError("Only real numeric dtypes are allowed in remainder") |
| 646 | # Call result type here just to raise on disallowed type combinations |
| 647 | _result_type(x1.dtype, x2.dtype) |
| 648 | x1, x2 = Array._normalize_two_args(x1, x2) |
| 649 | return Array._new(np.remainder(x1._array, x2._array)) |
| 650 | |
| 651 | |
| 652 | def round(x: Array, /) -> Array: |
no test coverage detected