[yt-svn] commit/yt: ngoldbaum: Merged in ngoldbaum/yt (pull request #1969)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Feb 3 18:52:19 PST 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/be66247e2a8a/
Changeset:   be66247e2a8a
Branch:      yt
User:        ngoldbaum
Date:        2016-02-04 02:52:14+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1969)

Compatible with upcoming numpy 1.11 release. Closes #1162
Affected #:  4 files

diff -r f7c36e4a075f699037baa4fcee0b7450df85a8b4 -r be66247e2a8a1454ad2e7c29ef3473bf17e39b6e yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -92,7 +92,7 @@
     def _reshape_vals(self, arr):
         nz = self.nz
         if len(arr.shape) <= 2:
-            n_oct = arr.shape[0] / (nz**3.0)
+            n_oct = arr.shape[0] / (nz**3)
         else:
             n_oct = max(arr.shape)
         if arr.size == nz*nz*nz*n_oct:

diff -r f7c36e4a075f699037baa4fcee0b7450df85a8b4 -r be66247e2a8a1454ad2e7c29ef3473bf17e39b6e yt/testing.py
--- a/yt/testing.py
+++ b/yt/testing.py
@@ -262,7 +262,7 @@
     data = {}
     for field, offset, u in zip(fields, offsets, units):
         if "position" in field:
-            v = np.random.normal(npart, 0.5, 0.25)
+            v = np.random.normal(loc=0.5, scale=0.25, size=npart)
             np.clip(v, 0.0, 1.0, v)
         v = (np.random.random(npart) - offset)
         data[field] = (v, u)

diff -r f7c36e4a075f699037baa4fcee0b7450df85a8b4 -r be66247e2a8a1454ad2e7c29ef3473bf17e39b6e yt/utilities/flagging_methods.py
--- a/yt/utilities/flagging_methods.py
+++ b/yt/utilities/flagging_methods.py
@@ -91,7 +91,7 @@
         self.sigs = []
         for dim in range(3):
             d1 = (dim + 1) % 3
-            d2 = (dim == 0)
+            d2 = int(dim == 0)
             self.sigs.append(self.flagged.sum(axis=d1).sum(axis=d2))
 
     @property
@@ -118,7 +118,7 @@
 
     def find_by_zero_signature(self, dim):
         sig = self.sigs[dim]
-        grid_ends = np.zeros((sig.size, 2))
+        grid_ends = np.zeros((sig.size, 2), dtype='int64')
         ng = 0
         i = 0
         while i < sig.size:

diff -r f7c36e4a075f699037baa4fcee0b7450df85a8b4 -r be66247e2a8a1454ad2e7c29ef3473bf17e39b6e yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -313,7 +313,7 @@
 
     def _get_positions_vectors(self, camera, disparity):
 
-        single_resolution_x = np.floor(camera.resolution[0]) / 2
+        single_resolution_x = int(np.floor(camera.resolution[0]) / 2)
 
         east_vec = camera.unit_vectors[0]
         north_vec = camera.unit_vectors[1]
@@ -681,7 +681,7 @@
         if self.disparity is None:
             self.disparity = camera.width[0] / 1000.
 
-        single_resolution_x = np.floor(camera.resolution[0])/2
+        single_resolution_x = int(np.floor(camera.resolution[0]) / 2)
         px = np.linspace(-np.pi, np.pi, single_resolution_x,
                          endpoint=True)[:, None]
         py = np.linspace(-np.pi/2., np.pi/2., camera.resolution[1],

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