Rebase + squash + fixup of #814.

To my knowledge this is always safe.
Le 3 déc. 2014 15:54, "Ian Goodfellow" <notifications@github.com> a écrit :

> In pylearn2/datasets/cifar10.py:
>
> >
> >          if start is not None:
> >              # This needs to come after the prepro so that it doesn't
> >              # change the pixel means computed above for toronto_prepro
> >              assert start >= 0
> >              assert stop > start
> > -            assert stop <= X.shape[0]
> > -            X = X[start:stop, :]
> > -            y = y[start:stop, :]
> > -            assert X.shape[0] == y.shape[0]
> > +            assert stop <= self.X.shape[0]
> > +            self.X = self.X[start:stop, :]
> > +            self.y = self.y[start:stop]
>
> after playing around in numpy, it looks like it is safe to drop the ", :"
> for y, but isn't it also safe to drop the ", :" for X?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lisa-lab/pylearn2/pull/1295/files#r21264092>.
>