Open
Description
In Python 3, floor
and ceil
changed to return integers, rather than floats:
>>> math.floor(1.5), math.ceil(1.5)
(1, 2)
>>> np.floor(1.5), np.ceil(1.5)
(1.0, 2.0) # also the output for the first case on 2.7
Should we update these function in numpy to also return integer types?
I think the deprecation path would be
- add
f->i
loops to the ufunc, so thatnp.floor(1.5, dtype=int)
is possible - on python 3, start
FutureWarning
onnp.floor(1.5)
with no dtype - on python 3, switch the default dtype to
int