Re: [Scikit-learn-general] Array memory layout and slicing

2013-11-27 Thread Gael Varoquaux
On Wed, Nov 27, 2013 at 11:59:27AM +1100, Juan Nunez-Iglesias wrote: > I'll also point out that np.copy has an "order" argument, so you can get back > a > Fortran-ordered array by doing  > >>> X_train = X_train.copy(order='F')  # lets materialize the view That's only in recentish versions of num

Re: [Scikit-learn-general] Array memory layout and slicing

2013-11-26 Thread Juan Nunez-Iglesias
I'll also point out that np.copy has an "order" argument, so you can get back a Fortran-ordered array by doing >>> X_train = X_train.copy(order='F') # lets materialize the view On Tue, Nov 26, 2013 at 11:53 PM, Peter Prettenhofer < peter.prettenho...@gmail.com> wrote: > > > > 2013/11/26 Olivi

Re: [Scikit-learn-general] Array memory layout and slicing

2013-11-26 Thread Peter Prettenhofer
2013/11/26 Olivier Grisel > 2013/11/26 Peter Prettenhofer : > > Hi all, > > > > I'm currently modifying our tree code so that it runs on both fortran > and c > > continuous arrays. After some benchmarking I got aware of the following > > numpy behavior that was contrary to what I was expecting::

Re: [Scikit-learn-general] Array memory layout and slicing

2013-11-26 Thread Robert Kern
On Tue, Nov 26, 2013 at 10:30 AM, Peter Prettenhofer < peter.prettenho...@gmail.com> wrote: > > Hi all, > > I'm currently modifying our tree code so that it runs on both fortran and c continuous arrays. After some benchmarking I got aware of the following numpy behavior that was contrary to what I

Re: [Scikit-learn-general] Array memory layout and slicing

2013-11-26 Thread Olivier Grisel
2013/11/26 Peter Prettenhofer : > Hi all, > > I'm currently modifying our tree code so that it runs on both fortran and c > continuous arrays. After some benchmarking I got aware of the following > numpy behavior that was contrary to what I was expecting:: > > >>> X = # some feature matrix > >>