title: Python Shared Memory Array, no attribute get_obj()
body: <p>I am working on manipulating numpy arrays using the multiprocessing module and am running into an issue trying out some of the code I have run across here.  Specifically, I am creating a ctypes array from a numpy array and then trying to return the ctypes array to a numpy array.  Here is the code:</p>
  
  <pre><code>    shared_arr = multiprocessing.RawArray(_numpy_to_ctypes[array.dtype.type],array.size)
  </code></pre>
  
  <p>I do not need any kind of synchronization lock, so I am using RawArray.  The ctypes data type is pulled from a dictionary based on the dtype of the input array.  That is working wonderfully.</p>
  
  <pre><code>    shared_arr = numpy.ctypeslib.as_array(shared_arr.get_obj())
  </code></pre>
  
  <p>Here I get a stack trace stating:</p>
  
  <pre><code>    AttributeError: 'c_double_Array_16154769' object has no attribute 'get_obj'
  </code></pre>
  
  <p>I have also tried the following from <a href="https://stackoverflow.com/a/7908612/839375">this post</a>, but get an identical error.</p>
  
  <pre><code>    def tonumpyarray(shared_arr):
          return numpy.frombuffer(shared_arr.get_obj())  
  </code></pre>
  
  <p>I am stuck running python 2.6 and do not know if that is the issue, if it is an issue with sharing the variable name (I am trying to keep memory usage as low as possible and am trying not to duplicate the numpy array and the ctypes array in memory), or something else as I am just learning about this component of python.</p>
  
  <p>Suggestions?</p>