Inverse Transform Sampling Python