Duplication of the Vector-Fitting algorithm in python