datetime

Methods

Method Reference: datetime.median

datetime: M = median (A)
datetime: M = median (A, dim)
datetime: M = median (A, 'all')
datetime: M = median (…, nanflag)

Median of a datetime array.

M = median (A) returns the median of the datetime array A as a datetime, computed on the absolute instants along the first non-singleton dimension (for an even number of elements the average of the two middle instants). A dim or 'all' argument selects the dimension(s). The result carries the Format and TimeZone of A. Missing-value handling matches mean.

Source Code: datetime