[yt-svn] commit/yt: ngoldbaum: Fixing Radius and ParticleRadius for reduced dimensionality datasets.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Jul 30 10:08:19 PDT 2013


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/3990dd43ecce/
Changeset:   3990dd43ecce
Branch:      yt
User:        ngoldbaum
Date:        2013-07-30 18:26:16
Summary:     Fixing Radius and ParticleRadius for reduced dimensionality datasets.
Affected #:  1 file

diff -r 9095ffb28958788842dcbe76bcf61070dab6df8d -r 3990dd43ecce97cb7a3e6a02ec87da260cd2e540 yt/data_objects/universal_fields.py
--- a/yt/data_objects/universal_fields.py
+++ b/yt/data_objects/universal_fields.py
@@ -801,6 +801,8 @@
         rdw = radius.copy()
     for i, ax in enumerate('xyz'):
         np.subtract(data["%s%s" % (field_prefix, ax)], center[i], r)
+        if data.pf.dimensionality < i+1:
+            break
         if data.pf.periodicity[i] == True:
             np.abs(r, r)
             np.subtract(r, DW[i], rdw)

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