Markov process representation

Paul Rubin http
Thu Mar 16 01:50:31 CET 2006


"kpp9c" <kp8 at mac.com> writes:
>     self._all_states |= set(key[i] for key in probabilities)
> I am running:
> Python 2.3 (#1, Sep 13 2003, 00:49:11)

generator comprehensions are new in 2.4.  Try:

   self._all_states |= set([key[i] for key in probabilities])

This does temporarily use more memory.



More information about the Python-list mailing list