Skip to content

Instantly share code, notes, and snippets.

@bsdlp
Created September 19, 2013 17:58
Show Gist options
  • Save bsdlp/6627353 to your computer and use it in GitHub Desktop.
Save bsdlp/6627353 to your computer and use it in GitHub Desktop.
>>> huh = [x for x in huh if x != 0]
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 10, 11, 11, 11, 12, 13, 13, 14, 14, 14, 15, 16, 16, 19, 50]
>>> numpy.percentile(huh,25)
1.0
>>> numpy.percentile(huh,50)
2.0
>>> numpy.percentile(huh,75)
5.0
>>> numpy.percentile(huh,100)
50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment