Max in sliding window python prototype