Update array2d.pyi

This commit is contained in:
blueloveTH 2024-02-16 20:13:56 +08:00
parent 504d9cf79b
commit 974efb9070

View File

@ -41,12 +41,12 @@ class array2d(Generic[T]):
def copy_(self, other: 'array2d[T] | list[T]') -> None: ... def copy_(self, other: 'array2d[T] | list[T]') -> None: ...
# algorithms # algorithms
def count_neighbors(self, value: T, neighborhood: Neighborhood = 'moore') -> 'array2d[int]':
"""Counts the number of neighbors with the given value for each cell."""
def count(self, value: T) -> int: def count(self, value: T) -> int:
"""Counts the number of cells with the given value.""" """Counts the number of cells with the given value."""
def count_neighbors(self, value: T, neighborhood: Neighborhood = 'moore') -> 'array2d[int]':
"""Counts the number of neighbors with the given value for each cell."""
def find_bounding_rect(self, value: T) -> tuple[int, int, int, int] | None: def find_bounding_rect(self, value: T) -> tuple[int, int, int, int] | None:
"""Finds the bounding rectangle of the given value. """Finds the bounding rectangle of the given value.