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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Mar 23 13:49:04 PDT 2016


2 new commits in yt:

http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BXcTD42YocdnOFkyGBVHOUKFLnuUF2RkuhV4Pu6gZREDlSYY0g7otY1tBEW3m1YVY-3D_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27ALl0yxp-2FL6VeZYeTP6R8ULfXPdlfSHLNaNtOCPLjDWaQdtf9llOx5EZgzWY6uo10bszU54Cw0i43IAu96ybwUZ0kfn-2FIb47PaN5wBv0Xe9nn2-2F5kkAzwkgNzU-2Bu6Q-2B3LZhw67i8gM-2Fvd5rrm3GrqIq-2BMFgdmhYPiEDQmY3aKI6K4bkRzw-2B0AqUs3DYXHJxX4o-3D
Changeset:   ea705325a186
Branch:      yt
User:        MatthewTurk
Date:        2016-03-17 18:37:16+00:00
Summary:     Fix some types of octree block traversal.

When either empty block is encountered or when the block is of shape (1,1,1),
special case the traversal such that the buffers are of the right shape.  This
can show up most frequently in ARTIO simulations where the root grid is
fully-refined, or where data objects touch root grid objects but only the
refined ones.  Or some other cases I'm not 100% sure of.
Affected #:  1 file

diff -r 9f8461c82f40422fce303ee43132a0c8b7afbc65 -r ea705325a186113cfdd230ccf8174e0b632921a7 yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -118,7 +118,7 @@
         mask = self.oct_handler.mask(selector, domain_id = self.domain_id)
         slicer = OctreeSubsetBlockSlice(self)
         for i, sl in slicer:
-            yield sl, mask[i,...]
+            yield sl, np.atleast_3d(mask[i,...])
 
     def select_tcoords(self, dobj):
         # These will not be pre-allocated, which can be a problem for speed and
@@ -129,6 +129,8 @@
             dt, t = dobj.selector.get_dt(sl)
             dts.append(dt)
             ts.append(t)
+        if len(dts) == len(ts) == 0:
+            return np.empty(0, "f8"), np.empty(0, "f8")
         return np.concatenate(dts), np.concatenate(ts)
 
     @property


http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BXcTD42YocdnOFkyGBVHOU7BTw6GywY3-2BWcPFH-2FTA4ffVg68ZGJh0nsA-2FYhwaNs0k-3D_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27ALl0yxp-2FL6VeZYeTP6R8ULfXPdlfSHLNaNtOCPLjDWaWJixHG5yUQbd-2BzqPpDAzycjAPIXeaRp2Hr1YiZvu6Ikw41nctMri-2B3KjADee8RNvJAbCDfJFcoZZt6hSdyPXAsgsTHiqTiratu5qRdw1l4KMlUGoP23L6hovEBSFqBWhSChRGQG6XpcwI2Q0gi2-2FYc-3D
Changeset:   293bfec508a7
Branch:      yt
User:        ngoldbaum
Date:        2016-03-23 20:48:54+00:00
Summary:     Merged in MatthewTurk/yt (pull request #2049)

Fix some types of octree block traversal.
Affected #:  1 file

diff -r b6563d32400e520b26ccbb6793998537d91e61af -r 293bfec508a7e0d143791ffd2f67eb974638bd0e yt/data_objects/octree_subset.py
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -118,7 +118,7 @@
         mask = self.oct_handler.mask(selector, domain_id = self.domain_id)
         slicer = OctreeSubsetBlockSlice(self)
         for i, sl in slicer:
-            yield sl, mask[i,...]
+            yield sl, np.atleast_3d(mask[i,...])
 
     def select_tcoords(self, dobj):
         # These will not be pre-allocated, which can be a problem for speed and
@@ -129,6 +129,8 @@
             dt, t = dobj.selector.get_dt(sl)
             dts.append(dt)
             ts.append(t)
+        if len(dts) == len(ts) == 0:
+            return np.empty(0, "f8"), np.empty(0, "f8")
         return np.concatenate(dts), np.concatenate(ts)
 
     @property

Repository URL: http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BI0v8SbQq-2B8-2FZaaHaJT85r_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27ALl0yxp-2FL6VeZYeTP6R8ULfXPdlfSHLNaNtOCPLjDWaUOi4pNl-2BJ4xNvj-2BSW4bOF-2FklInnYx7FxZTXjM1JqNwvKrtdYipMXHI0QDIPvv9411reTOqkqol5jHl2l-2FBvucdKuw-2BMWp2hK1l85-2FP9oPycKtAfwG-2BCMBEET89OzWLc1-2FbNl5KbR-2BlR6KbEMqIvZbw-3D

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160323/44808060/attachment.html>


More information about the yt-svn mailing list