def mx2num(mxdates):
    '\n    Convert mx :class:`datetime` instance (or sequence of mx\n    instances) to the new date format.\n    '
    scalar = False
    if (not cbook.iterable(mxdates)):
        scalar = True
        mxdates = [mxdates]
    ret = epoch2num([m.ticks() for m in mxdates])
    if scalar:
        return ret[0]
    else:
        return ret
Convert mx :class:`datetime` instance (or sequence of mx
instances) to the new date format.
def mx2num(mxdates):
    '\n    Convert mx :class:`datetime` instance (or sequence of mx\n    instances) to the new date format.\n    '
    scalar = False
    if (not cbook.iterable(mxdates)):
        scalar = True
        mxdates = [mxdates]
    ret = epoch2num([m.ticks() for m in mxdates])
    if scalar:
        return ret[0]
    else:
        return ret