BUG: nanpercentile 0-d with output given.

Also some PEP-8 fixes.