Matlab-python interface broken ?
33 views (last 30 days)
I was experimenting with the Matlab-python interface and it seems there are serious issues.
Here are two very simple things I tried:
matrix = py.numpy.zeros(int32([3 3]))
and it outputs 1. Actually it outputs 1 for any matrix
On the other side if I use
I get a bunch of segmentation falt and illegal instruction errors.
When I do it with a python interpreter (in the same terminal I started Matlab to make sure i have the same environment) the code works properly.
Does anyone have the same behavior or is that my environment is somehow broken ?
Thank you for your help
Robert Snoeberger on 27 Sep 2017
When python is running within MATLAB, it ends up using MATLAB's MKL. It looks like your Python code is incompatible with MATLAB's MKL, probably due to incompatible compile-time options.
If you are on linux, then a workaround  to try is the following:
>> flag = int32(bitor(2, 8));
Run this code after you start MATLAB.