[yt-svn] commit/yt: Nathan Goldbaum: Create the index before calling derived quantities.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Mar 18 18:54:22 PDT 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/e870ed5eb0e8/
Changeset:   e870ed5eb0e8
Branch:      yt
User:        Nathan Goldbaum
Date:        2016-03-18 20:30:15+00:00
Summary:     Create the index before calling derived quantities.
Affected #:  1 file

diff -r ff8cdfb114c333124655223ef7b0aaffd01455bc -r e870ed5eb0e897bbaf4be9da9c78dbf0e0fcdd42 yt/data_objects/derived_quantities.py
--- a/yt/data_objects/derived_quantities.py
+++ b/yt/data_objects/derived_quantities.py
@@ -58,6 +58,8 @@
 
     def __call__(self, *args, **kwargs):
         """Calculate results for the derived quantity"""
+        # create the index if it doesn't exist yet
+        self.data_source.ds.index
         self.count_values(*args, **kwargs)
         chunks = self.data_source.chunks([], chunking_style="io")
         storage = {}

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