Skip to content

Commit

Permalink
udpated behavoir of the scatter method
Browse files Browse the repository at this point in the history
  • Loading branch information
lcgraham committed Jun 30, 2015
1 parent 15213b1 commit 89fea22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bet/Comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
to run BET.
"""

import collections

class comm_for_no_mpi4py(object):

Expand Down Expand Up @@ -78,6 +79,8 @@ def scatter(self, val1, val2=None, root=0):
:rtype: object
:returns: val1
"""
if isinstance(val1, collections.Iterable) and len(val1)==1:
val1 = val1[0]
return val1

def Allgather(self, val, val2=None):
Expand Down

0 comments on commit 89fea22

Please sign in to comment.