A converter from Matlab to Python