[Yt-svn] commit/yt: samskillman: bug fix in integer calculation.
Bitbucket
commits-noreply at bitbucket.org
Wed Apr 6 05:48:45 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/dddae02163d2/
changeset: r4092:dddae02163d2
branch: stable
user: samskillman
date: 2011-04-06 14:46:57
summary: bug fix in integer calculation.
affected #: 1 file (14 bytes)
--- a/yt/utilities/amr_kdtree/amr_kdtree.py Wed Apr 06 00:11:52 2011 -0400
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py Wed Apr 06 08:46:57 2011 -0400
@@ -573,8 +573,8 @@
dds = thisnode.grid.dds
gle = thisnode.grid.LeftEdge
gre = thisnode.grid.RightEdge
- thisnode.li = ((thisnode.l_corner-gle)/dds).astype('int32')
- thisnode.ri = ((thisnode.r_corner-gle)/dds).astype('int32')
+ thisnode.li = na.rint((thisnode.l_corner-gle)/dds).astype('int32')
+ thisnode.ri = na.rint((thisnode.r_corner-gle)/dds).astype('int32')
thisnode.dims = (thisnode.ri - thisnode.li).astype('int32')
# Here the cost is actually inversely proportional to 4**Level (empirical)
thisnode.cost = (na.prod(thisnode.dims)/4.**thisnode.grid.Level).astype('int64')
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list