In this example we will show how to find the middle number of some numbers using the NumPy median() method in Python.
Source Code
import numpy as np
num = [15, 20, 18, 32, 25, 28, 19, 22]
median_num = np.median(num)
print(median_num)
Output:
21.0