good catch. Fixed


On Tue, May 20, 2014 at 7:13 PM, abergeron <notifications@github.com> wrote:

> In theano/gof/link.py:
>
> > +        data_was_in_memo = id(self.storage[0]) in memo
> > +        r = type(self)(
> > +            deepcopy(self.type, memo),
> > +            deepcopy(self.storage, memo=memo),
> > +            deepcopy(self.readonly, memo=memo),
> > +            deepcopy(self.strict, memo=memo),
> > +            deepcopy(self.allow_downcast, memo=memo),
> > +            deepcopy(self.name
> , memo),
> > +            )
> > +        # Work around NumPy deepcopy of ndarray with 0 dimention that
> > +        # don't return an ndarray.
> > +        if (r.storage[0] is not None and
> > +            not self.type.is_valid_value(r.storage[0])):
> > +
> > +            assert not data_was_in_memo
> > +            r.data = r.storage[0]
>
> That will fail if you deepcopy a readonly Container. I'm also not sure
> about whether strict=True will complain or not.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1864/files#r12873914>
> .
>