[yt-svn] commit/yt: MatthewTurk: Fix for Ghost Zones on particle fields, when the fields are ready grid-by-grid.

Bitbucket commits-noreply at bitbucket.org
Tue Jun 12 04:01:25 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/b3d0215359c7/
changeset:   b3d0215359c7
branch:      yt
user:        MatthewTurk
date:        2012-06-12 13:00:58
summary:     Fix for Ghost Zones on particle fields, when the fields are ready grid-by-grid.
affected #:  1 file

diff -r 08f29a9cec42435bb0581a2059b4f1c7abd6c8c5 -r b3d0215359c7b3411ec5b9b8bc169c162034a112 yt/frontends/enzo/io.py
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -201,6 +201,8 @@
     _data_style = "enzo_packed_3d_gz"
 
     def modify(self, field):
+        if len(tr.shape) < 3:
+            return field
         tr = field[3:-3,3:-3,3:-3].swapaxes(0,2)
         return tr.copy() # To ensure contiguous

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