I have recently begun making python calls directly from MATLAB for a number of different things, including non-blocking .mat file saves. So far this has been working but I haven't been able to find documentation on the way data is being passed to the Python interpreter.
With Java, many sources indicate that data is passed by value and not by reference. This leads to a fair amount of overhead to transfer large amounts of data which I have noticed before in my applications. To deal with this I have designed my applications specifically to transfer data back and forth as little as possible between java and MATLAB and attempted to spread out that transfer as much as possible, so instead of transferring a large data structure all at once I transfer the data in chunks as it becomes available.
What I really want to know is whether or not I should be doing the same thing for Python. I have not yet noticed much overhead passing data to the Python interpreter, but I haven't tried passing anything particularly large yet (just a few MB at a time, so far). Can someone enlighten me about the specifics of the data passing functionality and best practices for dealing with it?