Open numpy-gitbot opened 12 years ago
Original ticket http://projects.scipy.org/numpy/ticket/2141 on 2012-05-23 by atmention:pbrod, assigned to unknown.
as shown in the following example:
In [12]: np.__version__ Out[12]: '1.6.1' In [13]: np.round(3.434523, decimals=3) Out[13]: 3.4350000000000001 In [14]: np.round(np.array(3.434523), decimals=3) Out[14]: 3.4350000000000001
However, correct result is obtained when the value is converted to a one dimensional array, as shown here:
In [15]: np.round([3.434523], decimals=3) Out[15]: array([ 3.435]) In [16]: np.round(np.array([3.434523]), decimals=3) Out[16]: array([ 3.435])
A related issue is Ticket #1648
Original ticket http://projects.scipy.org/numpy/ticket/2141 on 2012-05-23 by atmention:pbrod, assigned to unknown.
as shown in the following example:
However, correct result is obtained when the value is converted to a one dimensional array, as shown here:
A related issue is Ticket #1648