Added support for NChannelImage and ExtendToNChannel


Sorry for all the previous open/close pull requests. This is the only merge to look at.

Hmm ok, I'll commit those soon.




On Thu, Jul 10, 2014 at 3:18 PM, J.L Stevens <notifications@github.com>
wrote:

> In imagen/image.py:
>
> >      """
> >
> > -    filename = param.Filename(default='images/numpy_array_feret_photo.npy',precedence=0.9,doc="""
> > -        File path (can be relative to Param's base path) to the Numpy file.""")
> > +    random_generator = param.Callable(
> > +        default=numbergen.UniformRandom(lbound=0,ubound=1,seed=1048921))
> >
>
> Oh. I've just realised that random_generator is simply misnamed - this
> *isn't* a random state object (which is what the random_generator
> parameter is everywhere else)!
>
> So I think everything should be fine after these changes:
>
>    1.
>
>    This parameter needs to be renamed. Maybe random_numbergen or similar.
>    Therandom_generator parameter exists elsewhere and it means something
>    different.
>    2.
>
>    The default numbergen (UniformRandom) needs a name argument for
>    time_dependent behaviour in future. Just add name='hue_jitter' (or
>    similar) to the numbergen object.
>     3.
>
>    It shouldn't be a param.Callable. Instead it should be a ClassSelector
>    that only accepts numbergen.RandomDistribution objects.
>
> With those three changes (and a docstring) I think everything will work
> fine.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ioam/imagen/pull/29/files#r14768027>.
>