[yt-svn] [yt_analysis/yt] Slices don't work with pfs created with load_uniform_grid when the active dimensions are not equal along the three axes (issue #470)

John ZuHone issues-reply at bitbucket.org
Thu Nov 29 15:06:41 PST 2012


--- you can reply above this line ---

New issue 470: Slices don't work with pfs created with load_uniform_grid when the active dimensions are not equal along the three axes
https://bitbucket.org/yt_analysis/yt/issue/470/slices-dont-work-with-pfs-created-with

John ZuHone:

For me and @MatthewTurk to look at:

The following: 

magp = np.random.random((256,128,128))
data = {'MagneticEnergy': magp}
bbox = np.array([[-2.0,2.0],[-1.0,1.0],[0.0,1.0]])
pf = load_uniform_grid(data, magp.shape, 1.0,bbox=bbox)

slc = SlicePlot(pf, 2, ["MagneticEnergy"])
slc.set_log("MagneticEnergy", True)
slc.save()

Results in this:

Traceback (most recent call last):
  File "slices.py", line 23, in <module>
    slc = SlicePlot(pf, 2, ["MagneticEnergy"])
  File "/local/data/duce2/zuhone/src/yt/yt/visualization/plot_window.py", line 1062, in __init__
    slc = pf.h.slice(axis, center[axis], fields=fields)
  File "/local/data/duce2/zuhone/src/yt/yt/data_objects/data_containers.py", line 1045, in __init__
    self._refresh_data()
  File "/local/data/duce2/zuhone/src/yt/yt/data_objects/data_containers.py", line 316, in _refresh_data
    self.get_data()
  File "/local/data/duce2/zuhone/src/yt/yt/data_objects/data_containers.py", line 848, in get_data
    for grid in self._get_grids()]
  File "/local/data/duce2/zuhone/src/yt/yt/data_objects/data_containers.py", line 91, in save_state
    tr = func(self, grid, field, *args, **kwargs)
  File "/local/data/duce2/zuhone/src/yt/yt/data_objects/data_containers.py", line 1175, in _get_data_from_grid
    dataVals = dv.ravel()[mask.ravel() == 1]
ValueError: too many boolean indices

Responsible: jzuhone
--

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