Array API compatible wrapper for :py:func:`np.floor_divide `. See its docstring for more information.
(x1: Array, x2: Array, /)
| 337 | |
| 338 | |
| 339 | def floor_divide(x1: Array, x2: Array, /) -> Array: |
| 340 | """ |
| 341 | Array API compatible wrapper for :py:func:`np.floor_divide <numpy.floor_divide>`. |
| 342 | |
| 343 | See its docstring for more information. |
| 344 | """ |
| 345 | if x1.dtype not in _real_numeric_dtypes or x2.dtype not in _real_numeric_dtypes: |
| 346 | raise TypeError("Only real numeric dtypes are allowed in floor_divide") |
| 347 | # Call result type here just to raise on disallowed type combinations |
| 348 | _result_type(x1.dtype, x2.dtype) |
| 349 | x1, x2 = Array._normalize_two_args(x1, x2) |
| 350 | return Array._new(np.floor_divide(x1._array, x2._array)) |
| 351 | |
| 352 | |
| 353 | def greater(x1: Array, x2: Array, /) -> Array: |
no test coverage detected