[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Sep 9 12:29:16 PDT 2015


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/c9c28269b856/
Changeset:   c9c28269b856
Branch:      stable
User:        xarthisius
Date:        2015-09-05 03:50:42+00:00
Summary:     Ensure that width and center used during Camera initialization have common units. Fixes #1080,
Affected #:  1 file

diff -r 906a63f0edd1dd8cb1380cad7371553e1633bb6d -r c9c28269b8569aa73e10d0dea8f7c44a226a87d9 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -180,6 +180,10 @@
             width = self.ds.arr(width, input_units="code_length")
         if not isinstance(center, YTArray):
             center = self.ds.arr(center, input_units="code_length")
+        # Ensure that width and center are in the same units
+        # Cf. https://bitbucket.org/yt_analysis/yt/issue/1080
+        width.convert_to_units("code_length")
+        center.convert_to_units("code_length")
         self.orienter = Orientation(normal_vector, north_vector=north_vector, steady_north=steady_north)
         if not steady_north:
             self.rotation_vector = self.orienter.unit_vectors[1]


https://bitbucket.org/yt_analysis/yt/commits/425ff6dc64a8/
Changeset:   425ff6dc64a8
Branch:      stable
User:        xarthisius
Date:        2015-09-05 02:51:41+00:00
Summary:     Make sure that fields passed to 'process_octree' during smoothing are contiguous. Fixes #1079
Affected #:  1 file

diff -r c9c28269b8569aa73e10d0dea8f7c44a226a87d9 -r 425ff6dc64a8eb92354d7e6091653a397c068167 yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -158,7 +158,7 @@
             indexed octree will be constructed on these particles.
         fields : list of arrays
             All the necessary fields for computing the particle operation.  For
-            instance, this might include mass, velocity, etc.  
+            instance, this might include mass, velocity, etc.
         method : string
             This is the "method name" which will be looked up in the
             `particle_deposit` namespace as `methodname_deposit`.  Current
@@ -209,7 +209,7 @@
             indexed octree will be constructed on these particles.
         fields : list of arrays
             All the necessary fields for computing the particle operation.  For
-            instance, this might include mass, velocity, etc.  
+            instance, this might include mass, velocity, etc.
         index_fields : list of arrays
             All of the fields defined on the mesh that may be used as input to
             the operation.
@@ -262,11 +262,14 @@
         op.initialize()
         mylog.debug("Smoothing %s particles into %s Octs",
             positions.shape[0], nvals[-1])
-        op.process_octree(self.oct_handler, mdom_ind, positions, 
+        # Pointer operations within 'process_octree' require arrays to be
+        # contiguous cf. https://bitbucket.org/yt_analysis/yt/issues/1079
+        fields = [np.ascontiguousarray(f, dtype="float64") for f in fields]
+        op.process_octree(self.oct_handler, mdom_ind, positions,
             self.fcoords, fields,
             self.domain_id, self._domain_offset, self.ds.periodicity,
             index_fields, particle_octree, pdom_ind, self.ds.geometry)
-        # If there are 0s in the smoothing field this will not throw an error, 
+        # If there are 0s in the smoothing field this will not throw an error,
         # but silently return nans for vals where dividing by 0
         # Same as what is currently occurring, but suppressing the div by zero
         # error.
@@ -339,7 +342,7 @@
         op.initialize()
         mylog.debug("Smoothing %s particles into %s Octs",
             positions.shape[0], nvals[-1])
-        op.process_particles(particle_octree, pdom_ind, positions, 
+        op.process_particles(particle_octree, pdom_ind, positions,
             fields, self.domain_id, self._domain_offset, self.ds.periodicity,
             self.ds.geometry)
         vals = op.finalize()
@@ -491,7 +494,7 @@
         LE -= np.abs(LE) * eps
         RE = self.max(axis=0)
         RE += np.abs(RE) * eps
-        octree = ParticleOctreeContainer(dims, LE, RE, 
+        octree = ParticleOctreeContainer(dims, LE, RE,
             over_refine = over_refine_factor)
         octree.n_ref = n_ref
         octree.add(mi)


https://bitbucket.org/yt_analysis/yt/commits/ac24e885d0b1/
Changeset:   ac24e885d0b1
Branch:      stable
User:        ngoldbaum
Date:        2015-09-09 19:28:35+00:00
Summary:     Added tag yt-3.2.1 for changeset 425ff6dc64a8
Affected #:  1 file

diff -r 425ff6dc64a8eb92354d7e6091653a397c068167 -r ac24e885d0b1dfea266de8d86af726ebe9bc7f0b .hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -5182,3 +5182,4 @@
 511887af4c995a78fe606e58ce8162c88380ecdc yt-3.0.2
 fd7cdc4836188a3badf81adb477bcc1b9632e485 yt-3.1.0
 28733726b2a751e774c8b7ae46121aa57fd1060f yt-3.2
+425ff6dc64a8eb92354d7e6091653a397c068167 yt-3.2.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