def __call__(self, x):
"""
Format a sequence of inputs
Parameters
----------
x : array
Input
Return
------
out : list
List of strings.
"""
# Formatter timezone
if self.tz is None and len(x):
tz = self.formatter.tz = x[0].tzinfo
if not all(value.tzinfo == tz for value in x):
msg = ("Dates have different time zones. "
"Choosen `{}` the time zone of the first date. "
"To use a different time zone, create a "
"formatter and pass the time zone.")
warn(msg.format(tz.zone))
# The formatter is tied to axes and takes
# breaks in ordinal format.
x = [date2num(val) for val in x]
return _format(self.formatter, x)
评论列表
文章目录