Exercise 6 (on pyecm.py)