MATLAB commands in numerical Python (NumPy)