def datestr2num(d, default=None):
 if cbook.is_string_like(d):
  dt = dateutil.parser.parse(d, default=default)
  return date2num(dt)
 else:
  if (default is not None):
   d = [dateutil.parser.parse(s, default=default) for s in d]
  d = np.asarray(d)
  if (not d.size):
   return d
  return date2num(_dateutil_parser_parse_np_vectorized(d))

def datestr2num ( d , default = None ) : if cbook . is_string_like ( d ) : dt = dateutil . parser . parse ( d , default = default ) return date2num ( dt ) else : if ( default is not None ) : d = [ dateutil . parser . parse ( s , default = default ) for s in d ] d = np . asarray ( d ) if ( not d . size ) : return d return date2num ( _dateutil_parser_parse_np_vectorized ( d ) )
convert a date string to a datenum using :func:dateutil .