How to calculate median using Numpy ?

There is a method median() in numpy, used to calculate median.

Example:--

>>> import numpy
>>> ss = [4, 6, 10, 12, 14, 8]
>>> median = numpy.median(ss)
>>> print(median)
9.0
>>> 

 

Total Views: 414