[yt-svn] commit/yt: xarthisius: [AMRHierarchy:get_data] Explicitly check the shape of the dataset instead of relying on try/except. Fixes failure with h5py-2.x
Bitbucket
commits-noreply at bitbucket.org
Thu Apr 12 07:11:29 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/986e71a53fa8/
changeset: 986e71a53fa8
branch: yt
user: xarthisius
date: 2012-04-12 15:54:09
summary: [AMRHierarchy:get_data] Explicitly check the shape of the dataset instead of relying on try/except. Fixes failure with h5py-2.x
affected #: 1 file
diff -r c03ace9420524bcf14dd8ca777cecf24dad87a0a -r 986e71a53fa83eded983328bae7efee3f2d519e9 yt/data_objects/hierarchy.py
--- a/yt/data_objects/hierarchy.py
+++ b/yt/data_objects/hierarchy.py
@@ -326,9 +326,9 @@
return None
full_name = "%s/%s" % (node, name)
- try:
+ if len(self._data_file[full_name].shape) > 0:
return self._data_file[full_name][:]
- except TypeError:
+ else:
return self._data_file[full_name]
def _close_data_file(self):
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