eryksun added the comment: decimal.Decimal 'floor division' is integer division that truncates toward 0 (see 9.4.2).
>>> Decimal('-0.5').__floor__() -1 >>> Decimal('-0.5').__floordiv__(1) Decimal('-0') Numpy 1.8.1: >>> np.float32(-0.5) // 1 -1.0 >>> np.float32(-0.5) // float('inf') -0.0 >>> np.array([-0.5]) // 1 array([-1.]) >>> np.array([-0.5]) // float('inf') array([-0.]) ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22198> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com