code: def decyear2dt(t):
      
      year = int(t)
      rem = t - year 
      base = datetime(year, 1, 1)
      dt = base + timedelta(seconds=(base.replace(year=base.year+1) - base).total_seconds() * rem)
      #This works for np array input
      #year = t.astype(int)
      #rem = t - year 
      #base = np.array([datetime(y, 1, 1) for y in year])
      return dt
docs: Convert decimal year to datetime