old_contents: 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')
  
new_contents: 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
      """
      if len(timedelta) == 0:
          return np.array([])
      else:
          return timedelta / np.timedelta64(1, 's')
  
subject: handle empty Index