[Numpy-discussion] probably simple, reverse a reshape...

John [H2O] washakie@gmail....
Mon Feb 23 16:41:42 CST 2009




John [H2O] wrote:
> 
> Hello, this is probably one of those questions that is going to seem
> simple after reading responses...
> 

and a few more minutes of thinking:
def row2shape(row,a):
      """ to get indices a 2d array row# to the 3d array 
      from which it was reshaped. ""
      d0,d1,d2 = a.shape;
      nd0 = row/d1;
      nd1 = (row-(nd0*d1));
      return nd0,nd1

-- 
View this message in context: http://www.nabble.com/probably-simple%2C-reverse-a-reshape...-tp22171584p22171790.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.



More information about the Numpy-discussion mailing list