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

Bitbucket commits-noreply at bitbucket.org
Thu Mar 15 01:59:15 PDT 2012


3 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/5a20a6be2478/
changeset:   5a20a6be2478
branch:      yt
user:        jzuhone
date:        2012-03-15 03:34:23
summary:     This fix ensures we get the "name" and "value" of the runtime parameters/scalars pair correctly by not assuming that theyxsxc occur in a specific order.
affected #:  1 file

diff -r c604391a080887d0fb9d573ab685b2f28a0f984e -r 5a20a6be24789872e110ec8270c465761fcc071b yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -289,7 +289,7 @@
         nn = "/%s %s" % (ptype,
                 {False: "runtime parameters", True: "scalars"}[scalar])
         if nn not in self._handle: raise KeyError(nn)
-        for tpname, pval in self._handle[nn][:]:
+        for tpname, pval in zip(self._handle[nn][:,'name'], self._handle[nn][:,'value']):
             if tpname.strip() == pname:
                 return pval
         raise KeyError(pname)



https://bitbucket.org/yt_analysis/yt/changeset/d2c8c46bdf7d/
changeset:   d2c8c46bdf7d
branch:      yt
user:        jzuhone
date:        2012-03-15 03:48:44
summary:     1) Edited a line to reduce its length.
2) Added a check to the value of the runtime parameter/scalar to strip it if it is string.
affected #:  1 file

diff -r 5a20a6be24789872e110ec8270c465761fcc071b -r d2c8c46bdf7db71dc406ee9a776694f2429812a7 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -289,9 +289,13 @@
         nn = "/%s %s" % (ptype,
                 {False: "runtime parameters", True: "scalars"}[scalar])
         if nn not in self._handle: raise KeyError(nn)
-        for tpname, pval in zip(self._handle[nn][:,'name'], self._handle[nn][:,'value']):
+        for tpname, pval in zip(self._handle[nn][:,'name'],
+                                self._handle[nn][:,'value']):
             if tpname.strip() == pname:
-                return pval
+                if ptype = "string" :
+                    return pval.strip()
+                else :
+                    return pval
         raise KeyError(pname)
 
     def _parse_parameter_file(self):



https://bitbucket.org/yt_analysis/yt/changeset/bed2fe41b688/
changeset:   bed2fe41b688
branch:      yt
user:        jzuhone
date:        2012-03-15 03:54:05
summary:     Bug fix: "==" instead of "="
affected #:  1 file

diff -r d2c8c46bdf7db71dc406ee9a776694f2429812a7 -r bed2fe41b6885b2a1c8cb325f2f9f4d1cea5521e yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -292,7 +292,7 @@
         for tpname, pval in zip(self._handle[nn][:,'name'],
                                 self._handle[nn][:,'value']):
             if tpname.strip() == pname:
-                if ptype = "string" :
+                if ptype == "string" :
                     return pval.strip()
                 else :
                     return pval

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