Changeset 979 for trunk

Show
Ignore:
Timestamp:
06/16/11 17:48:19 (11 months ago)
Author:
pierre
Message:

Minor bug when too small populations are launched in a parallel context

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common.py

    r977 r979  
    638638        if isinstance(value, random.RandomDistribution): 
    639639            initial_value = value.next(n=self.all_cells.size, mask_local=self._mask_local) 
     640            if not hasattr(initial_value, "__len__"): 
     641                initial_value = [initial_value] 
    640642            assert len(initial_value) == self.local_size, "%d != %d" % (len(initial_value), self.local_size) 
    641643        else: