原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.floor_divide.html
校对:(虚位以待)
numpy.
floor_divide
(x1, x2[, out]) = <ufunc 'floor_divide'>返回小于或等于输入的除法的最大整数。它等效于Python //
运算符,并与Python %
(remainder
)函数配对,使b = a % b + t14> * (a // b)
参数: | x1:array_like
x2:array_like
|
---|---|
返回: | y:ndarray
|
例子
>>> np.floor_divide(7,3)
2
>>> np.floor_divide([1., 2., 3., 4.], 2.5)
array([ 0., 0., 1., 1.])