x_higher = min(arr.shape[1], x_idx + (size // 2) + 1)