import numpy as np def circle_mask(xv, yv, radius): dist_from_center = np.sqrt(xv**2 + yv**2) return dist_from_center <= radius