[yt-svn] commit/yt: xarthisius: [gdf] Use default _read_data_slice. Fixes #502

Bitbucket commits-noreply at bitbucket.org
Fri Feb 15 11:21:28 PST 2013


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/56d08189016f/
changeset:   56d08189016f
branch:      yt
user:        xarthisius
date:        2013-02-15 20:20:05
summary:     [gdf] Use default _read_data_slice. Fixes #502
affected #:  1 file

diff -r 6ad7685b37719a895551010381a52b51b57e53c7 -r 56d08189016fbf735ab41af8a5b8742dea6c72fc yt/frontends/gdf/io.py
--- a/yt/frontends/gdf/io.py
+++ b/yt/frontends/gdf/io.py
@@ -38,13 +38,13 @@
         keys = fhandle['field_types'].keys()
         val = fhandle['field_types'].keys()
         return dict(zip(keys,val))
-        
+
     def _read_field_names(self,grid):
         fhandle = h5py.File(grid.filename,'r')
         names = fhandle['field_types'].keys()
         fhandle.close()
         return names
-    
+
     def _read_data(self,grid,field):
         fhandle = h5py.File(grid.hierarchy.hierarchy_filename,'r')
         data = (fhandle['/data/grid_%010i/'%grid.id+field][:]).copy()
@@ -53,15 +53,3 @@
             return data.T
         else:
             return data
-
-    def _read_data_slice(self, grid, field, axis, coord):
-        sl = [slice(None), slice(None), slice(None)]
-        sl[axis] = slice(coord, coord + 1)
-        if grid.pf.field_ordering == 1:
-            sl.reverse()
-        data = self._read_data_set(grid, field)
-        if grid.pf.field_ordering == 1:
-            return data.T
-        else:
-            return data
-

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