def mx2num(mxdates):
 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

def mx2num ( mxdates ) : 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 to the new date format .