bug in sampling.py where element of random variable couldn't be real number