[yt-svn] commit/yt: MatthewTurk: Merged in ngoldbaum/yt (pull request #2461)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Dec 13 08:04:12 PST 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/011cd1956321/
Changeset:   011cd1956321
Branch:      yt
User:        MatthewTurk
Date:        2016-12-13 16:03:46+00:00
Summary:     Merged in ngoldbaum/yt (pull request #2461)

Make ds.max_level a property that delegates to ds.index.max_level
Affected #:  1 file

diff -r ed03447eae86c5b2dd8d9b1d0eadfed0865d2728 -r 011cd19563215cefb3facfd5d6f575b6b38de0db yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -227,7 +227,6 @@
     particle_types_raw = ("io",)
     geometry = "cartesian"
     coordinates = None
-    max_level = 99
     storage_filename = None
     particle_unions = None
     known_filters = None
@@ -1318,6 +1317,18 @@
         self.field_dependencies.update(deps)
         return grad_fields
 
+    _max_level = None
+    @property
+    def max_level(self):
+        if self._max_level is None:
+            self._max_level = self.index.max_level
+
+        return self._max_level
+
+    @max_level.setter
+    def max_level(self, value):
+        self._max_level = value
+
 def _reconstruct_ds(*args, **kwargs):
     datasets = ParameterFileStore()
     ds = datasets.get_ds_hash(*args)

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