def _select_surround(self, i, j):
"""
Select the eight indices surrounding a given index.
"""
return ([i - 1, i - 1, i + 0, i + 1, i + 1, i + 1, i + 0, i - 1],
[j + 0, j + 1, j + 1, j + 1, j + 0, j - 1, j - 1, j - 1])
文章目录