In python 2.x, I can use the universal function numpy.divide
to do floor division. However, the ufunc divide
and true_divide
both do true division in python 3.x.
In [24]: np.divide([1, 2, 3, 4], 2)
Out[24]: array([ 0.5, 1. , 1.5, 2. ])
In [25]: np.true_divide([1, 2, 3, 4], 2)
Out[25]: array([ 0.5, 1. , 1.5, 2. ])
So what is the universal function in numpy with python3 to do floor division?