diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-07-05 09:19:32 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-07-05 09:19:32 +0100 |
| commit | 3050196e253fa050142303497686d9eb40a5cc04 (patch) | |
| tree | 7cc4201e189c28a0e1375d3a0c843e4569a03500 /challenge-172/eric-cheung/python/ch-2.py | |
| parent | a5191b0b44da36ea80dcbd71694ee8582bd2c579 (diff) | |
| download | perlweeklychallenge-club-3050196e253fa050142303497686d9eb40a5cc04.tar.gz perlweeklychallenge-club-3050196e253fa050142303497686d9eb40a5cc04.tar.bz2 perlweeklychallenge-club-3050196e253fa050142303497686d9eb40a5cc04.zip | |
- Added guest contributions by Eric Cheung.
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))
|
