Update sampling.py