This may or may not work, but you might want to try a Matlab to Python converter such as mat2py. I've never tried them, but it might save some time. Also, there's this page about Matlab to Numpy conversion that might help you get acquainted with the differences between the two.