Update quantfns.py