[Yt-svn] yt-commit r405 - trunk/yt/lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Apr 17 14:21:04 PDT 2008


Author: mturk
Date: Thu Apr 17 14:21:03 2008
New Revision: 405
URL: http://yt.spacepope.org/changeset/405

Log:
Fixes a subtle bug that showed up with grids with few particles.



Modified:
   trunk/yt/lagos/BaseDataTypes.py

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Thu Apr 17 14:21:03 2008
@@ -959,6 +959,7 @@
     @restore_grid_state
     def _get_data_from_grid(self, grid, field):
         if field in fieldInfo and fieldInfo[field].particle_type:
+            if grid.NumberOfParticles == 0: return []
             pointI = self._get_particle_indices(grid)
             try:
                 tr = grid[field][pointI].ravel()



More information about the yt-svn mailing list