I fixed both of them in a new commit


On Tue, Dec 10, 2013 at 2:59 PM, Pascal Lamblin <notifications@github.com>wrote:

> In theano/tensor/basic.py:
>
> > -            return ret[0][0]
> > +        # mess with the stabilization optimization and be too slow.
> > +        # We put all the scalar Ops used by get_canonical_form_slice()
> > +        # to allow it to determine the broadcast pattern correctly.
> > +        if ((isinstance(v.owner.op, Elemwise) and
> > +             isinstance(v.owner.op.scalar_op, scal.Second)) or
> > +            isinstance(v.owner.op, scal.Second)):
> > +            # We don't need both input to be constant for second
> > +            shape, val = v.owner.inputs
> > +            return get_scalar_constant_value(val)
> > +        elemwises = (scal.Cast, scal.Switch,
> > +                     scal.NEQ, scal.EQ,
> > +                     scal.LT, scal.GT, scal.LE, scal.GE,
> > +                     scal.Sub, scal.Add, scal.Mod, scal.Mul,
> > +                     scal.IntDiv, scal.TrueDiv,
> > +                     scal.Second)
>
> Is "scal.Second" necessary here, since it has its own case above?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1655/files#r8244954>
> .
>