[Numpy-discussion] Addressing arrays

Malcolm Reynolds malcolm.reynolds@gmail....
Mon Jan 30 09:26:59 CST 2012


On Mon, Jan 30, 2012 at 3:25 PM, Ted To <rainexpected@theo.to> wrote:
> Is there some straightforward way to access an array by values across a
> subset of its dimensions?  For example, if I have a three dimensional
> array a=(x,y,z), can I look at the values of z given particular values
> for x and y?

a[x, y, :] should get you what you want I believe..

Malcolm


More information about the NumPy-Discussion mailing list