diff options
Diffstat (limited to 'challenge-172/eric-cheung/python/ch-2.py')
| -rwxr-xr-x | challenge-172/eric-cheung/python/ch-2.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-172/eric-cheung/python/ch-2.py b/challenge-172/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..f8d57158f5 --- /dev/null +++ b/challenge-172/eric-cheung/python/ch-2.py @@ -0,0 +1,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))
|
