aboutsummaryrefslogtreecommitdiff
path: root/challenge-172/eric-cheung/python/ch-2.py
blob: f8d57158f573b5db310fe2dd14a808680bd3cba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
## Remarks
## https://en.wikipedia.org/wiki/Five-number_summary

import numpy as np

def getFiveNumSumm(arrData):

    ## Five Number Summary
    return np.percentile(arrData, [0, 25, 50, 75, 100], interpolation = "midpoint")

arrInput = [0, 0, 1, 2, 63, 61, 27, 13]
print (getFiveNumSumm(arrInput))