Return True if point is a valid index of grid.
(self, xi, yi)
| 340 | return self.ny, self.nx |
| 341 | |
| 342 | def within_grid(self, xi, yi): |
| 343 | """Return True if point is a valid index of grid.""" |
| 344 | # Note that xi/yi can be floats; so, for example, we can't simply check |
| 345 | # `xi < self.nx` since `xi` can be `self.nx - 1 < xi < self.nx` |
| 346 | return xi >= 0 and xi <= self.nx - 1 and yi >= 0 and yi <= self.ny - 1 |
| 347 | |
| 348 | |
| 349 | class StreamMask(object): |
no outgoing calls
no test coverage detected