yes I was a bit incoherent sorry ;)
the nans you added are not actually necessary as those tests don't check the result values of percentile, but they don't harm either