Add explicit pad parameter to compute_histogram