Re: [Numpy-discussion] round / set_printoptions discrepancy

2019-09-13 Thread Irvin Probst
On 13/09/2019 15:26, Eric Moore wrote: See the notes section here. https://numpy.org/devdocs/reference/generated/numpy.around.html. This note was recently added in https://github.com/numpy/numpy/pull/14392 Thanks, it indeed explains the discrepancy. _

Re: [Numpy-discussion] round / set_printoptions discrepancy

2019-09-13 Thread Irvin Probst
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 checked and np.set_printoptions behaves as python's ro

[Numpy-discussion] round / set_printoptions discrepancy

2019-09-13 Thread Irvin Probst
Hi, Is it expected/documented that np.round and np.set_printoptions do not output the same result on screen ? I tumbled into this running this code: import numpy as np mes = np.array([     [16.06, 16.13, 16.06, 16.00, 16.06, 16.00, 16.13, 16.00] ]) avg = np.mean(mes, axis=1) print(np.round(avg