[yt-svn] commit/yt: xarthisius: Ensure that dims is converted to numpy array in covering_grid constructor before it is used
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Mar 11 03:51:11 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/f327552a6ede/
Changeset: f327552a6ede
Branch: yt-3.0
User: xarthisius
Date: 2014-03-11 11:45:05
Summary: Ensure that dims is converted to numpy array in covering_grid constructor before it is used
Affected #: 1 file
diff -r 3e8b733c9ee97bd9dd08688a9c6b823be8fc35f6 -r f327552a6ede406b82711fb800ebcd5fe692d1cb yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -407,11 +407,12 @@
self.left_edge = np.array(left_edge)
self.level = level
+ self.ActiveDimensions = np.array(dims, dtype='int32')
rdx = self.pf.domain_dimensions*self.pf.relative_refinement(0, level)
- rdx[np.where(dims - 2 * num_ghost_zones <= 1)] = 1 # issue 602
+ # issue 602
+ rdx[np.where(self.ActiveDimensions - 2 * num_ghost_zones <= 1)] = 1
self.base_dds = self.pf.domain_width / self.pf.domain_dimensions
self.dds = self.pf.domain_width / rdx.astype("float64")
- self.ActiveDimensions = np.array(dims, dtype='int32')
self.right_edge = self.left_edge + self.ActiveDimensions*self.dds
self._num_ghost_zones = num_ghost_zones
self._use_pbar = use_pbar
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