Rik-Freeman

Results comments of Rik-Freeman

Submitted fix with regression tests in #9712. We also applied the identical fix to `references/classification/sampler.py` (`RASampler`), which shared the same padding logic.