layer.apply() takes 2 arguments, a 2d vector array, as well as the resolution.