From: Charles R H. <cha...@gm...> - 2006-10-18 01:47:23
|
On 10/17/06, Lisandro Dalcin <da...@gm...> wrote: > > I was surprised by this > > In [14]: array([[1,2,3],[4,5,6]]).reshape((3,2),order='F') > Out[14]: > array([[1, 5], > [4, 3], > [2, 6]]) This one still looks wrong. In [15]: array([1,2,3,4,5,6]).reshape((3,2),order='F') > Out[15]: > array([[1, 2], > [3, 4], > [5, 6]]) This one is fixed, In [3]: array([[1,2,3,4,5,6]]).reshape((3,2),order='F') Out[3]: array([[1, 4], [2, 5], [3, 6]]) I also don't understand why a copy is returned if 'F' just fiddles with the indices and strides; the underlying data should be the same, just the view changes. FWIW, I think both examples should be returning views. Chuck |