Added Length Op to typed list.

Added Length OP. New tests were passing the nightly build.
I forgot about this python limitation.


On Fri, Jun 13, 2014 at 1:45 PM, Hengjean <notifications@github.com> wrote:

> In theano/typed_list/tests/test_basic.py:
>
> > +    def test_sanity_check(self):
> > +        mySymbolicMatricesList = TypedListType(T.TensorType(
> > +                                theano.config.floatX, (False, False)))()
> > +
> > +        z = Length()(mySymbolicMatricesList)
> > +
> > +        f = theano.function([mySymbolicMatricesList], z)
> > +
> > +        x = rand_ranged_matrix(-1000, 1000, [100, 101])
> > +
> > +        self.assertTrue(f([x, x, x, x]) == 4)
> > +
> > +    def test_interface(self):
> > +        mySymbolicMatricesList = TypedListType(T.TensorType(
> > +                                theano.config.floatX, (False, False)))()
> > +        z = mySymbolicMatricesList.__len__()
>
> It doesn't work : "TypeError : an integer is required" error is thrown.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Theano/Theano/pull/1917/files#r13762702>.
>