Python Data Type Conversion Matlab