[yt-svn] [yt_analysis/yt] Load_uniform_grid does not work for certain domain sizes (issue #449)
Kacper Kowalik
issues-reply at bitbucket.org
Tue Oct 16 10:10:59 PDT 2012
--- you can reply above this line ---
New issue 449: Load_uniform_grid does not work for certain domain sizes
https://bitbucket.org/yt_analysis/yt/issue/449/load_uniform_grid-does-not-work-for
Kacper Kowalik:
Following script
#!python
from yt.mods import *
from yt.frontends.stream.api import load_uniform_grid
from yt.utilities.grid_data_format.writer import write_to_gdf
arr = np.random.random((7,7,1))
bbox = np.array([[0., 1.0], [-1.5, 1.5], [0.0, 1.0]])
data = dict(Density = arr)
pf = load_uniform_grid(data, arr.shape, 3.08e24, bbox=bbox, nprocs=8)
try:
os.remove('foobar.h5')
except OSError:
pass
#write_to_gdf(pf,'foobar.h5') # uncommenting this line "fixes" the issue
slc = SlicePlot(pf,2,'Density')
slc.save()
results in
#!bash
Traceback (most recent call last):
File "bug.py", line 17, in <module>
slc = SlicePlot(pf,2,'Density')
File "/home/xarth/codes/yt-my/yt/visualization/plot_window.py", line 992, in __init__
slc = pf.h.slice(axis, center[axis], fields=fields)
File "/home/xarth/codes/yt-my/yt/data_objects/data_containers.py", line 1041, in __init__
self._refresh_data()
File "/home/xarth/codes/yt-my/yt/data_objects/data_containers.py", line 315, in _refresh_data
self.get_data()
File "/home/xarth/codes/yt-my/yt/data_objects/data_containers.py", line 844, in get_data
for grid in self._get_grids()]
File "/home/xarth/codes/yt-my/yt/data_objects/data_containers.py", line 91, in save_state
tr = func(self, grid, field, *args, **kwargs)
File "/home/xarth/codes/yt-my/yt/data_objects/data_containers.py", line 1171, in _get_data_from_grid
dataVals = dv.ravel()[mask.ravel() == 1]
--
This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
More information about the yt-svn
mailing list