title: Python: How to pass numpy array to matlab array efficiently
body: <p>I am working on a project in python. Due to some reason, I have to call matlab for calculation</p>
  
  <p>ubuntu 14.04 64bit</p>
  
  <p>python 2.7.6</p>
  
  <p>numpy 1.11.1</p>
  
  <p>matlab 2016a linux-64bit</p>
  
  <pre><code>import matlab
  import matlab.engine
  import numpy as np
  import time
  
  data = np.random.rand(1000, 100, 100)
  
  print ('pass begin')
  st = time.time()
  data_matlab = matlab.double(data.tolist())
  print ('pass numpy to matlab finished in {:.2f} sec'.format(time.time() - st))
  </code></pre>
  
  <p>passing a float64 type numpy array with shape of 1000,100,100 to matlab array takes 63.49 seconds. This is unacceptable. Is there any efficient way to passing big data array from numpy to matlab array in python ?</p>
  
  <pre><code>pass begin
  pass numpy to matlab finished in 63.49 sec
  </code></pre>