[yt-svn] commit/yt: ngoldbaum: Merging yt-3.0 into yt

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Dec 2 15:28:57 PST 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/02ef23fcc82e/
Changeset:   02ef23fcc82e
Branch:      yt
User:        ngoldbaum
Date:        2014-12-02 23:28:22+00:00
Summary:     Merging yt-3.0 into yt
Affected #:  1 file

diff -r ace1367a92817ab0dc1dd2b0fe5735fd0494a9ea -r 02ef23fcc82e96c58e4786027e42534cc6d09be1 yt/fields/local_fields.py
--- a/yt/fields/local_fields.py
+++ b/yt/fields/local_fields.py
@@ -21,8 +21,15 @@
 from .field_info_container import \
     FieldInfoContainer
 
+class LocalFieldInfoContainer(FieldInfoContainer):
+    def add_field(self, name, function=None, **kwargs):
+        if not isinstance(name, tuple):
+            name = ('gas', name)
+        return super(LocalFieldInfoContainer,
+                     self).add_field(name, function, **kwargs)
+
 # Empty FieldInfoContainer
-local_fields = FieldInfoContainer(None, [], None)
+local_fields = LocalFieldInfoContainer(None, [], None)
 
 add_field = derived_field = local_fields.add_field

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