[yt-svn] commit/yt: MatthewTurk: In unions, only check particle types if they actually exist.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Mar 27 07:59:23 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/fe29ada2ad54/
Changeset: fe29ada2ad54
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-27 15:43:52
Summary: In unions, only check particle types if they actually exist.
Affected #: 1 file
diff -r a8b501fd2fbfcb5d93914e01829c675582055de7 -r fe29ada2ad54bcd9565acd24ba5f78d0c0ce6cd9 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -364,7 +364,8 @@
# No string lookups here, we need an actual union.
f = self.particle_fields_by_type
fields = set_intersection([f[s] for s in union
- if s in self.particle_types_raw])
+ if s in self.particle_types_raw
+ and len(f[s]) > 0])
for field in fields:
units = set([])
for s in union:
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