EMD in Python