[yt-svn] commit/yt: MatthewTurk: Make sure we have an index before finding position field names.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Jul 12 14:41:00 PDT 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/3c0c6f90d620/
Changeset: 3c0c6f90d620
Branch: yt
User: MatthewTurk
Date: 2016-07-12 18:52:00+00:00
Summary: Make sure we have an index before finding position field names.
Affected #: 1 file
diff -r 34215a75cce49013f1910ac18733a926a668241e -r 3c0c6f90d620f629bb71a989eb8c5c9a0b6958b7 yt/data_objects/derived_quantities.py
--- a/yt/data_objects/derived_quantities.py
+++ b/yt/data_objects/derived_quantities.py
@@ -594,6 +594,8 @@
"""
def __call__(self, field):
+ # Make sure we have an index
+ self.data_source.index
sample_fields = get_position_fields(field, self.data_source)
rv = super(MaxLocation, self).__call__(field, sample_fields)
if len(rv) == 1: rv = rv[0]
@@ -641,6 +643,8 @@
"""
def __call__(self, field):
+ # Make sure we have an index
+ self.data_source.index
sample_fields = get_position_fields(field, self.data_source)
rv = super(MinLocation, self).__call__(field, sample_fields)
if len(rv) == 1: rv = rv[0]
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