def date2num(d):
    '\n    *d* is either a :class:`datetime` instance or a sequence of datetimes.\n\n    Return value is a floating point number (or sequence of floats)\n    which gives the number of days (fraction part represents hours,\n    minutes, seconds) since 0001-01-01 00:00:00 UTC, *plus* *one*.\n    The addition of one here is a historical artifact.  Also, note\n    that the Gregorian calendar is assumed; this is not universal\n    practice.  For details, see the module docstring.\n    '
    if (not cbook.iterable(d)):
        return _to_ordinalf(d)
    else:
        d = np.asarray(d)
        if (not d.size):
            return d
        return _to_ordinalf_np_vectorized(d)
*d* is either a :class:`datetime` instance or a sequence of datetimes.

Return value is a floating point number (or sequence of floats)
which gives the number of days (fraction part represents hours,
minutes, seconds) since 0001-01-01 00:00:00 UTC, *plus* *one*.
The addition of one here is a historical artifact.  Also, note
that the Gregorian calendar is assumed; this is not universal
practice.  For details, see the module docstring.
def date2num(d):
    '\n    *d* is either a :class:`datetime` instance or a sequence of datetimes.\n\n    Return value is a floating point number (or sequence of floats)\n    which gives the number of days (fraction part represents hours,\n    minutes, seconds) since 0001-01-01 00:00:00 UTC, *plus* *one*.\n    The addition of one here is a historical artifact.  Also, note\n    that the Gregorian calendar is assumed; this is not universal\n    practice.  For details, see the module docstring.\n    '
    if (not cbook.iterable(d)):
        return _to_ordinalf(d)
    else:
        d = np.asarray(d)
        if (not d.size):
            return d
        return _to_ordinalf_np_vectorized(d)