Re: [Numpy-discussion] round

2006-10-11 Thread David Goldsmith
Charles R Harris wrote: > > > On 10/11/06, *Greg Willden* <[EMAIL PROTECTED] > > wrote: > > Hi All, > > I've read discussions in the archives about how round() "rounds to > even" and how that is supposedly better. > > But what I haven't been able to find i

Re: [Numpy-discussion] round

2006-10-11 Thread Bill Baxter
Hmm. I learned "round to even" in school... But another formula that should get you what you want is: floor(x + 0.5).astype(int) --bb On 10/12/06, Greg Willden <[EMAIL PROTECTED]> wrote: > Hi All, > > I've read discussions in the archives about how round() "rounds to even" and > how that is s

Re: [Numpy-discussion] round

2006-10-11 Thread Greg Willden
On 10/11/06, Charles R Harris <[EMAIL PROTECTED]> wrote: Perhaps you could explain *why* you want the schoolbook round? Given that floating point is inherently inaccurate you would have to expect to produce a lot of numbers exactly of the form x.5 *without errors*, which means you probably don't ne

Re: [Numpy-discussion] round

2006-10-11 Thread Charles R Harris
On 10/11/06, Greg Willden <[EMAIL PROTECTED]> wrote: Hi All,I've read discussions in the archives about how round() "rounds to even" and how that is supposedly better.But what I haven't been able to find is "What do I use if I want the regular old round that you learn in school?" Perhaps you could

[Numpy-discussion] round

2006-10-11 Thread Greg Willden
Hi All,I've read discussions in the archives about how round() "rounds to even" and how that is supposedly better.But what I haven't been able to find is "What do I use if I want the regular old round that you learn in school?" Sorry for the likely FAQ.Greg-- Linux.  Because rebooting is for adding

Re: [Numpy-discussion] round() bug

2006-08-26 Thread Charles R Harris
Hi,On 8/26/06, Sven Schreiber <[EMAIL PROTECTED]> wrote: Hi,is this normal behavior?:>>> import numpy as n; print n.mat(0.075).round(2); printn.mat(0.575).round(2)[[ 0.08]][[ 0.57]]  In [7]: (arange(100)*.5).round()Out[7]: array([  0.,   0.,   1.,   2.,   2.,   2.,   3.,   4.,   4.,   4.,   5.,

[Numpy-discussion] round() bug

2006-08-26 Thread Sven Schreiber
Hi, is this normal behavior?: >>> import numpy as n; print n.mat(0.075).round(2); print n.mat(0.575).round(2) [[ 0.08]] [[ 0.57]] Again, yesterday's svn on windows. cheers, Sven - Using Tomcat but need to do more? Need to