-
numpy.floor_divide(x1, x2[, out]) =
-
Return the largest integer smaller or equal to the division of the inputs. It is equivalent to the Python
//
operator and pairs with the Python%
(remainder
), function so thatb = a % b + b * (a // b)
up to roundoff.Parameters: x1 : array_like
Numerator.
x2 : array_like
Denominator.
Returns: y : ndarray
y = floor(
x1
/x2
)See also
Examples
1234>>> np.floor_divide(
7
,
3
)
2
>>> np.floor_divide([
1.
,
2.
,
3.
,
4.
],
2.5
)
array([
0.
,
0.
,
1.
,
1.
])
numpy.floor_divide()

2025-01-10 15:47:30
Please login to continue.