Changed in https://github.com/Theano/Theano/pull/1627

I tested manually in python 3.3, so it should be good to mereg


On Mon, Nov 25, 2013 at 8:04 PM, Pascal Lamblin <notifications@github.com>wrote:

> In theano/tensor/var.py:
>
> > @@ -605,6 +605,10 @@ def _get_sum(self):
> >              return self._sum
> >          except AttributeError:
> >              self._sum = self.no_nan.sum()
> > +            # The following 2 lines are needede as in Python 3.3 with NumPy
> > +            # 1.7.1, numpy.ndarray and numpy.memmap aren't hashable.
> > +            if type(self._sum) is numpy.memmap:
> > +                self._sum = numpy.asarray(self._sum).sum()
>
> So, you use it to extract the only element of a 0-d array? Could we use
> numpy.asarray(self._sum).item() instead?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1623/files#r7912113>
> .
>