![](https://secure.gravatar.com/avatar/4f98becee709da3e88f193e87a24c18b.jpg?s=120&d=mm&r=g)
Dear all, I want to create a function and I would like one of the arguments of the function to determine what slicing of numpy array I want to use. a simple example: a=np.arange(100).reshape(10,10) suppose I want to have a imaging function to show image of part of this data: def show_part_of_data(m,n): plt.imshow(a[m,n]) like I can give m=3:5, n=2:7, when I call function show_part_of_data(3:5,2:7), this means I try to do plt.imshow(a[3:5,2:7]). the above example doesn't work in reality. but it illustrates something similar that I desire, that is, I can specify what slicing of number array I want by giving values to function arguments. thanks a lot, Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************