Return whether (*xi*, *yi*) is a valid index of the grid.
(self, xi, yi)
| 418 | return self.ny, self.nx |
| 419 | |
| 420 | def within_grid(self, xi, yi): |
| 421 | """Return whether (*xi*, *yi*) is a valid index of the grid.""" |
| 422 | # Note that xi/yi can be floats; so, for example, we can't simply check |
| 423 | # `xi < self.nx` since *xi* can be `self.nx - 1 < xi < self.nx` |
| 424 | return 0 <= xi <= self.nx - 1 and 0 <= yi <= self.ny - 1 |
| 425 | |
| 426 | |
| 427 | class StreamMask: |
no outgoing calls
no test coverage detected