def _dt_to_float_ordinal(dt):
if (isinstance(dt, (np.ndarray, Index, ABCSeries)<EOL>) and is_datetime64_ns_dtype(dt)):<EOL><INDENT>base = dates.epoch2num(dt.asi8 / <NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>base = dates.date2num(dt)<EOL><DEDENT>return base<EOL>
Convert :mod:`datetime` to the Gregorian date as UTC float days,
preserving hours, minutes, seconds and microseconds.  Return value
is a :func:`float`.