title: Scatter a dictionary in python using MPI
body: <p>I am fairly new to the world of python and MPI. I am looking at the scatter method and wondering if it is possible to scatter a dictionary.</p>
  
  <p>I have worked with integers and other data types but since, a dictionary can contain anything I am not sure if it can be scattered as a numpy object. Below is what I have tried but it is obviously not working. I do not know how to scatter 'data' even if it is possible as data is a dictionary. </p>
  
  <pre><code>from mpi4py import MPI
  import numpy as np
  
  comm = MPI.COMM_WORLD
  size = comm.Get_size()
  rank = comm.Get_rank()
  
  #data = None
  data = {'a': 7,'b': 3.14}
  if rank == 0:
     data = np.linspace(1,size) #this is wrong...how do I scatter a dictionary
  
  recvbuf = np.empty(data,dtype=None)
  print  comm.Scatter(data, recvbuf, root=0)
  
  print "Rank: ",rank," recvbuf received:",recvbuf
  </code></pre>