Performance Issue using cell() to convert Python data types to Matlab
I have a Python list of 50,000 elements in Matlab, and using the cell() function to convert it to Matlab cell array is taking over an hour, while on my coworkers machine it takes less than a minute. We are both using Python 3.9, Matlab 2021b, and my VM is v4cpu 16G RAM. Also, when trying to pause or stop the execution of cell() Matlab freezes, and has to be forcefully shut down.
Note – The code below executed instantly in this website, but takes over an hour on Matlab 2021b installed on my local.
pyrun("py_list = list(range(50000))");
cellArray = cell(pyrun(‘py_list’, ‘py_list’));I have a Python list of 50,000 elements in Matlab, and using the cell() function to convert it to Matlab cell array is taking over an hour, while on my coworkers machine it takes less than a minute. We are both using Python 3.9, Matlab 2021b, and my VM is v4cpu 16G RAM. Also, when trying to pause or stop the execution of cell() Matlab freezes, and has to be forcefully shut down.
Note – The code below executed instantly in this website, but takes over an hour on Matlab 2021b installed on my local.
pyrun("py_list = list(range(50000))");
cellArray = cell(pyrun(‘py_list’, ‘py_list’)); I have a Python list of 50,000 elements in Matlab, and using the cell() function to convert it to Matlab cell array is taking over an hour, while on my coworkers machine it takes less than a minute. We are both using Python 3.9, Matlab 2021b, and my VM is v4cpu 16G RAM. Also, when trying to pause or stop the execution of cell() Matlab freezes, and has to be forcefully shut down.
Note – The code below executed instantly in this website, but takes over an hour on Matlab 2021b installed on my local.
pyrun("py_list = list(range(50000))");
cellArray = cell(pyrun(‘py_list’, ‘py_list’)); python, cell MATLAB Answers — New Questions