Run
import numpy as np arr = np.array([3, 1, 7, 2, 9]) median_value = np.median(arr) print(median_value)
Output