(mask: np.ndarray, r: int, c: int)
| 458 | |
| 459 | |
| 460 | def neighbor_count(mask: np.ndarray, r: int, c: int) -> int: |
| 461 | return sum(1 for rr, cc in hex_neighbors(r, c, mask.shape[0], mask.shape[1]) if mask[rr, cc]) |
| 462 | |
| 463 | |
| 464 | def prune_specks(cfg: Config, mask: np.ndarray, tag: str, passes: int, kill_prob: float = 0.70) -> np.ndarray: |
no test coverage detected