[yt-svn] commit/yt: MatthewTurk: Merged in jzuhone/yt-3.x/yt-3.0 (pull request #1054)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Jul 23 04:19:09 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/671ada625a84/
Changeset: 671ada625a84
Branch: yt-3.0
User: MatthewTurk
Date: 2014-07-23 13:19:01
Summary: Merged in jzuhone/yt-3.x/yt-3.0 (pull request #1054)
Fixes for test suite failures on Windows
Affected #: 6 files
diff -r eb1bd5bfd3e5e0ff1c964ddfdeb5c6442671be17 -r 671ada625a84111c80b8f7d25638ea20cc9bb02e yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -552,10 +552,10 @@
f.seek(0, os.SEEK_END)
fs = f.tell()
f.seek(0, os.SEEK_SET)
+ #Read in the header
+ t, n, ndim, ng, nd, ns = struct.unpack("<diiiii", f.read(28))
except IOError:
return False, 1
- #Read in the header
- t, n, ndim, ng, nd, ns = struct.unpack("<diiiii", f.read(28))
endianswap = "<"
#Check Endianness
if (ndim < 1 or ndim > 3):
diff -r eb1bd5bfd3e5e0ff1c964ddfdeb5c6442671be17 -r 671ada625a84111c80b8f7d25638ea20cc9bb02e yt/frontends/stream/data_structures.py
--- a/yt/frontends/stream/data_structures.py
+++ b/yt/frontends/stream/data_structures.py
@@ -436,7 +436,7 @@
pts = MatchPointsToGrids(grid_tree, len(x), x, y, z)
particle_grid_inds = pts.find_points_in_tree()
idxs = np.argsort(particle_grid_inds)
- particle_grid_count = np.bincount(particle_grid_inds,
+ particle_grid_count = np.bincount(particle_grid_inds.astype("intp"),
minlength=num_grids)
particle_indices = np.zeros(num_grids + 1, dtype='int64')
if num_grids > 1 :
diff -r eb1bd5bfd3e5e0ff1c964ddfdeb5c6442671be17 -r 671ada625a84111c80b8f7d25638ea20cc9bb02e yt/geometry/tests/test_particle_octree.py
--- a/yt/geometry/tests/test_particle_octree.py
+++ b/yt/geometry/tests/test_particle_octree.py
@@ -91,7 +91,7 @@
ds = load_particles(data, 1.0, bbox = bbox, n_ref = n_ref)
dd = ds.all_data()
bi = dd["io","mesh_id"]
- v = np.bincount(bi.astype("int64"))
+ v = np.bincount(bi.astype("intp"))
yield assert_equal, v.max() <= n_ref, True
bi2 = dd["all","mesh_id"]
yield assert_equal, bi, bi2
diff -r eb1bd5bfd3e5e0ff1c964ddfdeb5c6442671be17 -r 671ada625a84111c80b8f7d25638ea20cc9bb02e yt/utilities/lib/alt_ray_tracers.pyx
--- a/yt/utilities/lib/alt_ray_tracers.pyx
+++ b/yt/utilities/lib/alt_ray_tracers.pyx
@@ -101,7 +101,7 @@
rleft, rright, zleft, zright, \
cleft, cright, thetaleft, thetaright, \
tmleft, tpleft, tmright, tpright, tsect
- cdef np.ndarray[np.int64_t, ndim=1] inds, tinds, sinds
+ cdef np.ndarray[np.intp_t, ndim=1] inds, tinds, sinds
cdef np.ndarray[np.float64_t, ndim=2] xyz, rztheta, ptemp, b1, b2, dsect
# set up points
@@ -126,7 +126,7 @@
bsqrd = b**2
# Compute positive and negative times and associated masks
- I = left_edges.shape[0]
+ I = np.intp(left_edges.shape[0])
tmleft = np.empty(I, dtype='float64')
tpleft = np.empty(I, dtype='float64')
tmright = np.empty(I, dtype='float64')
@@ -152,7 +152,7 @@
np.argwhere(tmmright).flat,
np.argwhere(tpmright).flat,]))
if 0 == inds.shape[0]:
- inds = np.arange(np.int64(I))
+ inds = np.arange(np.intp(I))
thetaleft = np.empty(I)
thetaleft.fill(p1[2])
thetaright = np.empty(I)
diff -r eb1bd5bfd3e5e0ff1c964ddfdeb5c6442671be17 -r 671ada625a84111c80b8f7d25638ea20cc9bb02e yt/utilities/lib/misc_utilities.pyx
--- a/yt/utilities/lib/misc_utilities.pyx
+++ b/yt/utilities/lib/misc_utilities.pyx
@@ -27,7 +27,7 @@
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
-def new_bin_profile1d(np.ndarray[np.int64_t, ndim=1] bins_x,
+def new_bin_profile1d(np.ndarray[np.intp_t, ndim=1] bins_x,
np.ndarray[np.float64_t, ndim=1] wsource,
np.ndarray[np.float64_t, ndim=2] bsource,
np.ndarray[np.float64_t, ndim=1] wresult,
@@ -58,8 +58,8 @@
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
-def new_bin_profile2d(np.ndarray[np.int64_t, ndim=1] bins_x,
- np.ndarray[np.int64_t, ndim=1] bins_y,
+def new_bin_profile2d(np.ndarray[np.intp_t, ndim=1] bins_x,
+ np.ndarray[np.intp_t, ndim=1] bins_y,
np.ndarray[np.float64_t, ndim=1] wsource,
np.ndarray[np.float64_t, ndim=2] bsource,
np.ndarray[np.float64_t, ndim=2] wresult,
@@ -91,9 +91,9 @@
@cython.boundscheck(False)
@cython.wraparound(False)
@cython.cdivision(True)
-def new_bin_profile3d(np.ndarray[np.int64_t, ndim=1] bins_x,
- np.ndarray[np.int64_t, ndim=1] bins_y,
- np.ndarray[np.int64_t, ndim=1] bins_z,
+def new_bin_profile3d(np.ndarray[np.intp_t, ndim=1] bins_x,
+ np.ndarray[np.intp_t, ndim=1] bins_y,
+ np.ndarray[np.intp_t, ndim=1] bins_z,
np.ndarray[np.float64_t, ndim=1] wsource,
np.ndarray[np.float64_t, ndim=2] bsource,
np.ndarray[np.float64_t, ndim=3] wresult,
diff -r eb1bd5bfd3e5e0ff1c964ddfdeb5c6442671be17 -r 671ada625a84111c80b8f7d25638ea20cc9bb02e yt/utilities/particle_generator.py
--- a/yt/utilities/particle_generator.py
+++ b/yt/utilities/particle_generator.py
@@ -104,7 +104,7 @@
self.particles[:,self.posx_index] = x[idxs]
self.particles[:,self.posy_index] = y[idxs]
self.particles[:,self.posz_index] = z[idxs]
- self.NumberOfParticles = np.bincount(particle_grid_inds,
+ self.NumberOfParticles = np.bincount(particle_grid_inds.astype("intp"),
minlength=self.num_grids)
if self.num_grids > 1 :
np.add.accumulate(self.NumberOfParticles.squeeze(),
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