he is not asking for slicing. he is asking for how to index array by element value but not element index.<br><br><div class="gmail_quote">2012/1/30 Zachary Pincus <span dir="ltr"><<a href="mailto:zachary.pincus@yale.edu">zachary.pincus@yale.edu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">a[x,y,:]<br>
<br>
Read the slicing part of the tutorial:<br>
<a href="http://www.scipy.org/Tentative_NumPy_Tutorial" target="_blank">http://www.scipy.org/Tentative_NumPy_Tutorial</a><br>
(section 1.6)<br>
<br>
And the documentation:<br>
<a href="http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html" target="_blank">http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Jan 30, 2012, at 10:25 AM, Ted To wrote:<br>
<br>
> Hi,<br>
><br>
> Is there some straightforward way to access an array by values across a<br>
> subset of its dimensions?  For example, if I have a three dimensional<br>
> array a=(x,y,z), can I look at the values of z given particular values<br>
> for x and y?<br>
><br>
> Thanks,<br>
> Ted<br>
> _______________________________________________<br>
> NumPy-Discussion mailing list<br>
> <a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>***********************************************************************************</div>
<div>Chao YUE<br>Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)<br>UMR 1572 CEA-CNRS-UVSQ<br>Batiment 712 - Pe 119<br>91191 GIF Sur YVETTE Cedex</div>
<div>Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16<br></div>

<div>************************************************************************************</div><br>