from __future__ import print_function, division
import numpy as np

def timedelta64_to_secs(timedelta):
    """Convert `timedelta` to seconds.

    Parameters
    ----------
    timedelta : np.timedelta64

    Returns
    -------
    float : seconds
    """
    return timedelta / np.timedelta64(1, 's')

@@ -251,16 +251,86 @@
     %22%22%22%0A
+    if len(timedelta) == 0:%0A        return np.array(%5B%5D)%0A    else:%0A    
     retu

handle empty Index