[Yt-svn] commit/yt: sskory: Fixing a case in _get_bins() where mi may not have been defined,

Bitbucket commits-noreply at bitbucket.org
Wed Sep 28 08:44:08 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/80677ec277fa/
changeset:   80677ec277fa
branch:      yt
user:        sskory
date:        2011-09-28 17:42:43
summary:     Fixing a case in _get_bins() where mi may not have been defined,
but was still being returned at the end of the function.
affected #:  1 file (-1 bytes)

--- a/yt/data_objects/profiles.py	Tue Sep 27 13:30:56 2011 -0400
+++ b/yt/data_objects/profiles.py	Wed Sep 28 09:42:43 2011 -0600
@@ -267,11 +267,11 @@
             raise EmptyProfileData()
         # Truncate at boundaries.
         if self.end_collect:
-            sd = source_data[:]
+            mi = na.ones_like(source_data).astype('bool')
         else:
             mi = ((source_data > self._bins.min())
                &  (source_data < self._bins.max()))
-            sd = source_data[mi]
+        ds = source_data[mi]
         if sd.size == 0:
             raise EmptyProfileData()
         # Stick the bins into our fixed bins, set at initialization

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