Dear all, I have a simple question. Is there a way to denote the unchanged dimension in the reshape function? like suppose I have an array named "arr" having three dims with the first dimension length as 48, I want to reshape the first dim into 12*4, but keeping all the other dimension length unchanged.
like when we slice the array, we can use: arr[10:40, ... ], "...' represents all remaining dimesions. however when doing reshape, we must use: arr.reshape(12,-1,arr.shape(1),arr.shape(2)) Is there something allowing more flexible reshape, like: arr.reshape(12,-1,...)? thanks a lot in advance, best, Chao -- please visit: http://www.globalcarbonatlas.org/ *********************************************************************************** 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 ************************************************************************************
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion