Re: [Numpy-discussion] round / set_printoptions discrepancy

2019-09-13 Thread Philip Hodge
On 9/13/19 8:45 AM, Irvin Probst wrote: On 13/09/2019 14:05, Philip Hodge wrote: Isn't that just for consistency with Python 3 round()?  I agree that the discrepancy with np.set_printoptions is not necessarily expected, except possibly for backwards compatibility. I've just c

Re: [Numpy-discussion] round / set_printoptions discrepancy

2019-09-13 Thread Philip Hodge
On 9/13/19 7:23 AM, Andras Deak wrote: I just want to add that you can use literal 16.055 to reproduce this: import numpy as np np.set_printoptions(precision=2) np.array([16.055]).round(2) array([16.06]) np.array([16.055]) array([16.05]) I would think it has to do with "round to nearest eve