title: Shared array of objects using multiprocessing in python
body: <p>I am trying to create an array of shared objects (instances of a class) between different processes in a python program. Each of these objects would be modified in the program. For this purpose I am using multiprocessing as follows:</p>
  
  <pre><code>import multiprocessing
  import numpy as np
  sh = multiprocessing.RawArray (ctypes.py_object, 10)
  f = np.frombuffer(sh, dtype=object)
  </code></pre>
  
  <p>and the error I get is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;pyshell#14&gt;", line 1, in &lt;module&gt;
      f = np.frombuffer(sh, dtype=object)
  ValueError: cannot create an OBJECT array from memory buffer
  </code></pre>
  
  <p>Now my question is, first of all, is this generally the right way to tackle this problem, and second, what is my mistake in the above code? Thank you in advance.</p>