Merge "Adding 1D sampling to the library."