BUG: don't overwrite input percentile arrays
Merge pull request #4989 from juliantaylor/percentile-fix

BUG: don't overwrite input percentile arrays