Technical correctness is the best type of correctness.
a sample illustrates that [1,2,3,4] ought to yield 2.5.
However, the STATISTICAL DEFINITION of median is the DATA POINT which seperates the upper half from the lower half. By definition, the median MUST be a member of the data set.
As described in wikipedia, it is a common approch to take the mean of the 2 middle numbers when there is an even amount of observations: https://en.wikipedia.org/wiki/Median#Basic_procedure