Back to Numerical Arrays (NumPy)
np.divmod
Return element-wise quotient and remainder simultaneously.
Syntax
np.divmod(x1, x2)
Description
Return element-wise quotient and remainder simultaneously. Equivalent to (floor_divide(x1, x2), remainder(x1, x2)), but returns both in one call.
Parameters
| Name | Description |
|---|---|
| x1 | - Dividend array |
| x2 | - Divisor array |
Returns
[NDArray, NDArray]