I would like to know how to turn an n-dimensional numpy array into a linear (1-dimensional) one, such that underlying (linear) memory layout is guaranteed not the be changed