def datetime_from_ordinal_float(days):
if isinstance(days, (float, int)):<EOL><INDENT>if np.isnan(days) or days in set((float('<STR_LIT>'), float('<STR_LIT>'), float('<STR_LIT>'))):<EOL><INDENT>return days<EOL><DEDENT>dt = datetime.datetime.fromordinal(int(days))<EOL>seconds = (days - int(days)) * <NUM_LIT> * <NUM_LIT><EOL>microseconds = (seconds - int(seconds)) * <NUM_LIT><EOL>return dt + datetime.timedelta(days=<NUM_LIT:0>, seconds=int(seconds), microseconds=int(round(microseconds)))<EOL><DEDENT>return [datetime_from_ordinal_float(d) for d in days]<EOL>
Inverse of `ordinal_float()`, converts a float number of days back to a `datetime` object

    >>> dt = datetime.datetime(1970, 1, 1)
    >>> datetime_from_ordinal_float(ordinal_float(dt)) == dt
    True
    >>> dt = datetime.datetime(1, 2, 3, 4, 5, 6, 7)
    >>> datetime_from_ordinal_float(ordinal_float(dt)) == dt
    True