fix single element percentile

otherwise `NaN` would be returned, due to a division by zero