[yt-svn] commit/yt: MatthewTurk: get_data is not guaranteed to return a value. This adjusts particle IO to work

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Apr 16 15:27:53 PDT 2013


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/a1af53aa97b8/
Changeset:   a1af53aa97b8
Branch:      yt
User:        MatthewTurk
Date:        2013-04-17 00:27:41
Summary:     get_data is not guaranteed to return a value.  This adjusts particle IO to work
in some cases, specifically those where a ParticleIO handler is defined for a
frontend but not a 3D data object; I believe this is restricted exclusively to
Enzo and the Ellipsoid.
Affected #:  1 file

diff -r d0bc82a75da022a0185165fb8b72c444dc4da104 -r a1af53aa97b89abd94dc65933cad0423d48ccba5 yt/data_objects/particle_io.py
--- a/yt/data_objects/particle_io.py
+++ b/yt/data_objects/particle_io.py
@@ -58,7 +58,8 @@
 
     def get_data(self, fields):
         fields = ensure_list(fields)
-        rvs = self.source.get_data(fields, force_particle_read=True)
+        self.source.get_data(fields, force_particle_read=True)
+        rvs = [self.source[field] for field in fields]
         if len(fields) == 1: return rvs[0]
         return rvs

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