round

Bill Baxter wbaxter at gmail.com
Wed Oct 11 15:35:13 CDT 2006


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 <gregwillden at gmail.com> 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?"
>
> Sorry for the likely FAQ.
> Greg
> --
> Linux.  Because rebooting is for adding hardware.
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Numpy-discussion mailing list