```
def findMaxAverage(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: float
"""
running_sum = float(sum(nums[:k]))
running_avg = running_sum / k
max_avg = running_avg
for i in xrange(k,len(nums)):
running_sum += nums[i]
running_sum -= nums[i-k]
running_avg = running_sum / k
max_avg = max(running_avg, max_avg)
return max_avg
```