What is the process to calculate percentiles with NumPy?
import numpy as np
#np.percentile(arr,n,axis= (1,0))
# n = percentile, 1= row, 0 = column
arr = [10,20,30,40,50,60]
print(np.percentile(arr,5))
# 2D 
arr1 = [[10,20,30,40],[50,60,70,80]]
print(np.percentile(arr1,5))
 
Comments
Post a Comment
If you have any doubts, please let me know