Program in numpy percentile

import numpy as np

arr = [[14, 17, 12, 33, 44],

[15, 6, 27, 8, 19],

[23, 2, 54, 1, 4,]]

print("\narr : \n", arr)

print("\n50th Percentile of arr, axis = None : ",

np.percentile(arr, 50))

print("0th Percentile of arr, axis = None : ",

np.percentile(arr, 0))

print("\n50th Percentile of arr, axis = 0 : ",

np.percentile(arr, 50, axis =0))

print("0th Percentile of arr, axis = 0 : ",

np.percentile(arr, 0, axis =0))



No comments: