Yes, nothing magical happens when the filter circle gets towards the edges of your non-NaN grid and the number of nodes inside that are used goes down. It simply computes that weighted average based on what data it finds inside the circle. There are no boundary conditions applied since that would be very complicated. This is a spatial convolution.