Apr 12, 2023
You should keep doing that. `np.median` is implemented in C and will be a bit faster for regular Python sequences and massively faster for `numpy` arrays.
Also, numpy and scipy have a lot more solutions to your statistical problems, so are a good first place to go.