[yt-users] Finding the indices of a cell's neighbors

Morgan Presley mpresley at princeton.edu
Fri Jul 26 06:39:56 PDT 2013


Hello all,

I'm trying to access the density for a cell and its six neighbors (in the
x,y,z directions), but I can't figure out how I can get the information for
the neighboring cells. The problem is that dd[ 'NumberDensity' ] is a
one-dimensional array, and I don't know the original 3d shape of the data,
so I can't reshape the array into three dimensions. Is there a way to get
the indices of a cell's neighbors?

Thanks for any help!
Morgan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130726/5a2fd385/attachment.htm>


More information about the yt-users mailing list