[yt-svn] commit/yt: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Dec 2 14:16:12 PST 2014


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/5f72ccddeae6/
Changeset:   5f72ccddeae6
Branch:      yt-3.0
User:        hegan
Date:        2014-12-02 20:34:26+00:00
Summary:     making derived fields named explicitly
Affected #:  1 file

diff -r b1bf404154210b70892a5155980ea9d4533ae976 -r 5f72ccddeae6d9110b69fb235bb33311b5a91d17 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)
+        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
 


https://bitbucket.org/yt_analysis/yt/commits/e2afc578ac29/
Changeset:   e2afc578ac29
Branch:      yt-3.0
User:        hegan
Date:        2014-12-02 21:10:07+00:00
Summary:     addding a return value
Affected #:  1 file

diff -r 5f72ccddeae6d9110b69fb235bb33311b5a91d17 -r e2afc578ac2980a5c67f83b11f921e7214f48caa yt/fields/local_fields.py
--- a/yt/fields/local_fields.py
+++ b/yt/fields/local_fields.py
@@ -25,8 +25,8 @@
     def add_field(self, name, function=None, **kwargs):
         if not isinstance(name, tuple):
             name = ('gas', name)
-        super(LocalFieldInfoContainer,
-              self).add_field(name, function, **kwargs)
+        return super(LocalFieldInfoContainer,
+                     self).add_field(name, function, **kwargs)
 
 # Empty FieldInfoContainer
 local_fields = LocalFieldInfoContainer(None, [], None)

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