Dear all,<br><br>Is there some way to index the numpy array by specifying arbitrary axis and arbitrary slice, while<br>not knowing the actual shape of the data?<br>For example, I have a 3-dim data, data.shape = (3,4,5)<br>
Is there a way to retrieve data[:,0,:] by using something like np.retrieve_data(data,axis=2,slice=0),<br>by this way you don't have to know the actual shape of the array.<br>for for 4-dim data, np.retrieve_data(data,axis=2,slice=0) will actually be data[:,0,:,:]<br clear="all">
<br>thanks in advance,<br><br>Chao<br><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>