|
From: Philou <Kal...@wa...> - 2005-11-02 15:32:54
|
Hi list, I'm a new subsciber to this numpy list. I have a multidimensionnal array (>2). For example: x = numarray.array([[[1,2,3],[4,5,6]],[[1,2,3],[4,5,6]]]) print x [[[1 2 3] [4 5 6]] [[1 2 3] [4 5 6]]] I need to enumerate both indices and final values (1D) of the x array. So i need: (0,0,0) 1 (0,0,1) 2 (0,0,2) 2 (0,1,0) 4 (0,1,1) 5 (0,1,2) 6 (1,0,0) 1 (1,0,1) 2 How can i do without using the x.flat() method? Thanks a lot for the answer. regards, Philippe Collet |