title: IPython.parallel ValueError: cannot create an OBJECT array from memory buffer
body: <p>I'm trying to write a function to be executed in several IPython engines. The function takes a pandas Series as an argument. Each element of the Series is a string, and the whole Series constitutes a corpus for TF.IDF computation.</p>
  
  <p>After reading IPython parallel documentation and some tutorials, it seems to be quite straightforward to do, and I came up with the following:</p>
  
  <pre><code>import pandas as pd
  from IPython.parallel import Client
  
  
  def calculemus(corpus):
      from sklearn.feature_extraction.text import TfidfVectorizer
  
      vectorizer = TfidfVectorizer(min_df=1, stop_words='english')
  
      return vectorizer.fit_transform(corpus)
  
  
  review = pd.read_csv('review.csv')['text']
  review = review.fillna('')
  
  client = Client()
  
  r = client[-1].apply(calculemus, review).get()
  </code></pre>
  
  <p><strong>BUT</strong> I got this error instead: </p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)/xxx/site-packages/IPython/zmq/serialize.pyc in unpack_apply_message(bufs, g, copy)
      154                     sa.data = m.bytes
      155 
  --&gt; 156     args = uncanSequence(map(unserialize, sargs), g)
      157     kwargs = {}
      158     for k in sorted(skwargs.iterkeys()):
  /xxx/site-packages/IPython/utils/newserialized.pyc in unserialize(serialized)
      175 
      176 def unserialize(serialized):
  --&gt; 177     return UnSerializeIt(serialized).getObject()
  /xxx/site-packages/IPython/utils/newserialized.pyc in getObject(self)
      159                 buf = self.serialized.getData()
      160                 if isinstance(buf, (bytes, buffer, memoryview)):
  --&gt; 161                     result = numpy.frombuffer(buf, dtype = self.serialized.metadata['dtype'])
      162                 else:
      163                     raise TypeError("Expected bytes or buffer/memoryview, but got %r"%type(buf))
  ValueError: cannot create an OBJECT array from memory buffer
  </code></pre>
  
  <p>I'm not sure what the problem is, could someone enlighten me on this?</p>
  
  <p><br></p>
  
  <h1>UPDATE</h1>
  
  <p>Apparently the error says exactly what it says. If I do this:</p>
  
  <pre><code>r = client[-1].apply(calculemus, np.array(review, dtype=str)).get()
  </code></pre>
  
  <p>it kinda works. </p>
  
  <p>So the next question is, is this a feature or a limitation of IPython?</p>